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

$currentPage = 'palindrome-checker';
$pageTitle = 'Palindrome Checker Online - Free Text Checker | Vivora Tools';
$pageDescription = 'Use this free online palindrome checker to test words, phrases, and text instantly. Ignores spaces, punctuation, symbols, and case.';
$canonicalPath = 'palindrome-checker';
$bodyClass = 'tool-page palindrome-checker-page';
$breadcrumbs = [
    ['name' => 'Home', 'url' => ''],
    ['name' => 'Palindrome Checker', 'url' => 'palindrome-checker'],
];
$structuredData = [
    [
        '@context' => 'https://schema.org',
        '@type' => 'WebApplication',
        'name' => 'Palindrome Checker',
        'url' => site_url('palindrome-checker'),
        'description' => $pageDescription,
        'applicationCategory' => 'UtilitiesApplication',
        'operatingSystem' => 'Any',
        'offers' => [
            '@type' => 'Offer',
            'price' => '0',
            'priceCurrency' => 'USD',
        ],
        'featureList' => [
            'Online palindrome checker',
            'Check words and phrases instantly',
            'Ignore spaces and punctuation',
            'Text file upload',
            'Copy result',
            'Reset text',
        ],
    ],
    [
        '@context' => 'https://schema.org',
        '@type' => 'FAQPage',
        'mainEntity' => [
            [
                '@type' => 'Question',
                'name' => 'What is a palindrome?',
                'acceptedAnswer' => [
                    '@type' => 'Answer',
                    'text' => 'A palindrome is text that reads the same backward and forward after comparing its characters.',
                ],
            ],
            [
                '@type' => 'Question',
                'name' => 'Can I check palindrome phrases?',
                'acceptedAnswer' => [
                    '@type' => 'Answer',
                    'text' => 'Yes. You can check words, sentences, and phrases because the tool ignores spaces, punctuation, symbols, and letter case.',
                ],
            ],
            [
                '@type' => 'Question',
                'name' => 'Is this palindrome checker free?',
                'acceptedAnswer' => [
                    '@type' => 'Answer',
                    'text' => 'Yes. Vivora Tools provides this palindrome checker for free without requiring sign-up.',
                ],
            ],
            [
                '@type' => 'Question',
                'name' => 'Does this checker ignore spaces and punctuation?',
                'acceptedAnswer' => [
                    '@type' => 'Answer',
                    'text' => 'Yes. It ignores spaces, punctuation, symbols, and letter case so phrase palindromes are easier to check.',
                ],
            ],
        ],
    ],
];
require __DIR__ . '/includes/head.php';
require __DIR__ . '/includes/header.php';
?>

<section class="tool-hero palindrome-checker-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>Palindrome Checker</span>
        </nav>
        <h1>Palindrome Checker</h1>
        <p>
          Check palindromes online with a fast, free text checker. Type, paste, or upload text to see whether it reads the same backward and forward.
        </p>
      </div>
      <div class="tool-result" aria-live="polite">
        <span class="tool-result-label">Result</span>
        <strong id="palindromeResult">Ready</strong>
        <span class="tool-result-unit" id="palindromeResultNote">enter text</span>
      </div>
    </div>
  </div>
</section>

<main class="section pt-0">
  <div class="container">
    <section class="string-tool-shell palindrome-checker-tool-shell" data-palindrome-checker-tool>
      <div class="string-tool-toolbar" aria-label="Palindrome checker actions">
        <label class="icon-action upload-action" for="palindromeFileInput" title="Upload .txt file">
          <i class="fa-solid fa-upload" aria-hidden="true"></i>
          <span>Upload .txt</span>
        </label>
        <input id="palindromeFileInput" class="sr-only" type="file" accept=".txt,text/plain" />
        <button class="icon-action" type="button" id="copyPalindromeOutputButton" title="Copy result">
          <i class="fa-solid fa-copy" aria-hidden="true"></i>
          <span>Copy</span>
        </button>
        <button class="icon-action danger" type="button" id="resetPalindromeButton" 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="palindromeInput">Input text</label>
          <textarea id="palindromeInput" class="string-textarea" rows="12" placeholder="Paste text to check here..."></textarea>
          <div class="tool-meta-row">
            <span id="palindromeToolStatus">Ready to check palindrome text.</span>
            <span><strong id="palindromeInputCount">0</strong> input characters</span>
          </div>
        </div>

        <div class="string-input-panel output-panel">
          <label class="tool-label" for="palindromeOutput">Result</label>
          <textarea id="palindromeOutput" class="string-textarea output-textarea" rows="12" placeholder="Palindrome result will appear here..." readonly></textarea>
          <div class="tool-meta-row">
            <span>Checked result</span>
            <span><strong id="palindromeComparableCount">0</strong> comparable characters</span>
          </div>
        </div>
      </div>
    </section>

    <section class="tool-content-grid">
      <article>
        <h2>Check palindrome text online</h2>
        <p>
          This free tool checks whether your text reads the same backward and forward after removing spaces, punctuation, and symbols.
        </p>
      </article>
      <article>
        <h2>Useful for words and phrases</h2>
        <p>
          Try simple words like radar or longer phrases like A man, a plan, a canal: Panama.
        </p>
      </article>
    </section>

    <section class="tool-seo-panel" aria-labelledby="palindromeGuideTitle">
      <div class="tool-seo-intro">
        <span class="tool-seo-kicker">Palindrome guide</span>
        <h2 id="palindromeGuideTitle">How to use the Palindrome Checker</h2>
        <p>
          Use this online palindrome checker to test words, names, phrases, classroom examples, coding exercises, or puzzle answers.
        </p>
      </div>

      <div class="tool-steps">
        <article>
          <span>1</span>
          <h3>Add text</h3>
          <p>Type or paste a word, sentence, phrase, or upload a plain .txt file.</p>
        </article>
        <article>
          <span>2</span>
          <h3>Review the check</h3>
          <p>The tool compares the text forward and backward while ignoring spaces, symbols, punctuation, and case.</p>
        </article>
        <article>
          <span>3</span>
          <h3>Copy the result</h3>
          <p>Copy the checker result for notes, lessons, testing, or documentation.</p>
        </article>
      </div>
    </section>

    <section class="tool-seo-panel" aria-labelledby="palindromeFaqTitle">
      <div class="tool-seo-intro">
        <span class="tool-seo-kicker">FAQs</span>
        <h2 id="palindromeFaqTitle">Palindrome Checker FAQs</h2>
      </div>

      <div class="tool-faq-list">
        <article>
          <h3>What is a palindrome?</h3>
          <p>A palindrome is text that reads the same backward and forward after comparing its characters.</p>
        </article>
        <article>
          <h3>Can I check palindrome phrases?</h3>
          <p>Yes. The checker works for words and phrases because it ignores spaces, punctuation, symbols, and case.</p>
        </article>
        <article>
          <h3>Is this palindrome checker free?</h3>
          <p>Yes. You can use this Vivora Tools palindrome checker for free without creating an account.</p>
        </article>
        <article>
          <h3>Does this checker ignore spaces and punctuation?</h3>
          <p>Yes. It normalizes the text so phrase palindromes are easier to test accurately.</p>
        </article>
      </div>
    </section>
  </div>
</main>

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