<?php
require_once __DIR__ . '/includes/config.php';

$currentPage = 'remove-empty-lines';
$pageTitle = 'Remove Empty Lines Online - Delete Blank Lines | Vivora Tools';
$pageDescription = 'Use this free remove empty lines tool to delete blank and whitespace-only lines from text instantly. Paste text or upload a .txt file.';
$canonicalPath = 'remove-empty-lines';
$bodyClass = 'tool-page remove-empty-lines-page';
$breadcrumbs = [
    ['name' => 'Home', 'url' => ''],
    ['name' => 'Remove Empty Lines', 'url' => 'remove-empty-lines'],
];
$structuredData = [
    [
        '@context' => 'https://schema.org',
        '@type' => 'WebApplication',
        'name' => 'Remove Empty Lines',
        'url' => site_url('remove-empty-lines'),
        'description' => $pageDescription,
        'applicationCategory' => 'UtilitiesApplication',
        'operatingSystem' => 'Any',
        'offers' => [
            '@type' => 'Offer',
            'price' => '0',
            'priceCurrency' => 'USD',
        ],
        'featureList' => [
            'Remove empty lines online',
            'Remove blank lines',
            'Remove whitespace-only lines',
            'Text file upload',
            'Copy cleaned output',
            'Reset text',
        ],
    ],
    [
        '@context' => 'https://schema.org',
        '@type' => 'FAQPage',
        'mainEntity' => [
            [
                '@type' => 'Question',
                'name' => 'What counts as an empty line?',
                'acceptedAnswer' => [
                    '@type' => 'Answer',
                    'text' => 'An empty line is a line with no visible text. Lines that contain only spaces or tabs are also removed.',
                ],
            ],
            [
                '@type' => 'Question',
                'name' => 'Can I remove empty lines from a text file?',
                'acceptedAnswer' => [
                    '@type' => 'Answer',
                    'text' => 'Yes. Upload a .txt file and the tool will remove blank and whitespace-only lines automatically.',
                ],
            ],
            [
                '@type' => 'Question',
                'name' => 'Does this tool change non-empty lines?',
                'acceptedAnswer' => [
                    '@type' => 'Answer',
                    'text' => 'No. It removes blank lines and keeps non-empty lines in their original order.',
                ],
            ],
            [
                '@type' => 'Question',
                'name' => 'Is this blank line remover free?',
                'acceptedAnswer' => [
                    '@type' => 'Answer',
                    'text' => 'Yes. Vivora Tools provides this empty line remover for free without requiring sign-up.',
                ],
            ],
        ],
    ],
];
require __DIR__ . '/includes/head.php';
require __DIR__ . '/includes/header.php';
?>

<section class="tool-hero empty-lines-tool-hero">
  <div class="container">
    <div class="tool-hero-grid">
      <div>
        <nav class="tool-breadcrumb" aria-label="Breadcrumb">
          <a href="/">Home</a>
          <span>/</span>
          <span>Remove Empty Lines</span>
        </nav>
        <h1>Remove Empty Lines</h1>
        <p>
          Remove empty lines online from notes, lists, code snippets, and documents. Type, paste, or upload text to delete blank and whitespace-only lines.
        </p>
      </div>
      <div class="tool-result" aria-live="polite">
        <span class="tool-result-label">Removed</span>
        <strong id="emptyLinesRemovedResult">0</strong>
        <span class="tool-result-unit">lines</span>
      </div>
    </div>
  </div>
</section>

<main class="section pt-0">
  <div class="container">
    <section class="string-tool-shell empty-lines-tool-shell" data-remove-empty-lines-tool>
      <div class="string-tool-toolbar" aria-label="Remove empty lines actions">
        <label class="icon-action upload-action" for="emptyLinesFileInput" title="Upload .txt file">
          <i class="fa-solid fa-upload" aria-hidden="true"></i>
          <span>Upload .txt</span>
        </label>
        <input id="emptyLinesFileInput" class="sr-only" type="file" accept=".txt,text/plain" />
        <button class="icon-action" type="button" id="copyEmptyLinesOutputButton" title="Copy output">
          <i class="fa-solid fa-copy" aria-hidden="true"></i>
          <span>Copy</span>
        </button>
        <button class="icon-action danger" type="button" id="resetEmptyLinesButton" title="Reset text">
          <i class="fa-solid fa-rotate-left" aria-hidden="true"></i>
          <span>Reset</span>
        </button>
      </div>

      <div class="dual-textarea-layout">
        <div class="string-input-panel">
          <label class="tool-label" for="emptyLinesInput">Input text</label>
          <textarea id="emptyLinesInput" class="string-textarea" rows="12" placeholder="Paste text with empty lines here..."></textarea>
          <div class="tool-meta-row">
            <span id="emptyLinesToolStatus">Ready to remove empty lines.</span>
            <span><strong id="emptyLinesInputCount">0</strong> input lines</span>
          </div>
        </div>

        <div class="string-input-panel output-panel">
          <label class="tool-label" for="emptyLinesOutput">Output text</label>
          <textarea id="emptyLinesOutput" class="string-textarea output-textarea" rows="12" placeholder="Cleaned output will appear here..." readonly></textarea>
          <div class="tool-meta-row">
            <span>Cleaned text</span>
            <span><strong id="emptyLinesOutputCount">0</strong> output lines</span>
          </div>
        </div>
      </div>
    </section>

    <section class="tool-content-grid">
      <article>
        <h2>Remove blank lines online</h2>
        <p>
          This free tool removes empty lines from notes, copied data, code snippets, lists, and documents.
        </p>
      </article>
      <article>
        <h2>Keeps meaningful lines</h2>
        <p>
          Non-empty lines stay in their original order. Lines that contain only spaces or tabs are treated as empty and removed.
        </p>
      </article>
    </section>

    <section class="tool-seo-panel" aria-labelledby="emptyLinesGuideTitle">
      <div class="tool-seo-intro">
        <span class="tool-seo-kicker">Blank line remover guide</span>
        <h2 id="emptyLinesGuideTitle">How to use Remove Empty Lines</h2>
        <p>
          Use this blank line remover to clean copied content, lists, notes, exported data, code snippets, and documents with unnecessary empty rows.
        </p>
      </div>

      <div class="tool-steps">
        <article>
          <span>1</span>
          <h3>Add your text</h3>
          <p>Paste text with blank lines, type directly, or upload a plain .txt file.</p>
        </article>
        <article>
          <span>2</span>
          <h3>Remove empty lines</h3>
          <p>The tool removes blank and whitespace-only lines while keeping meaningful lines in order.</p>
        </article>
        <article>
          <span>3</span>
          <h3>Copy cleaned text</h3>
          <p>Copy the cleaned output or reset the tool to process another text block.</p>
        </article>
      </div>
    </section>

    <section class="tool-seo-panel" aria-labelledby="emptyLinesFaqTitle">
      <div class="tool-seo-intro">
        <span class="tool-seo-kicker">FAQs</span>
        <h2 id="emptyLinesFaqTitle">Remove Empty Lines FAQs</h2>
      </div>

      <div class="tool-faq-list">
        <article>
          <h3>What counts as an empty line?</h3>
          <p>An empty line has no visible text. Lines with only spaces or tabs are also removed.</p>
        </article>
        <article>
          <h3>Can I remove empty lines from a text file?</h3>
          <p>Yes. Upload a .txt file and the tool will remove blank lines automatically.</p>
        </article>
        <article>
          <h3>Does this tool change non-empty lines?</h3>
          <p>No. It removes blank lines and keeps non-empty lines in their original order.</p>
        </article>
        <article>
          <h3>Is this blank line remover free?</h3>
          <p>Yes. You can use this Vivora Tools blank line remover for free.</p>
        </article>
      </div>
    </section>
  </div>
</main>

<?php require __DIR__ . '/includes/footer.php'; ?>
