T
THINKFORU
Submit Feedback

LLMs.txt Validator: Check Markdown Syntax

LLMs.txt Validator: Check Markdown Syntax

llms.txt validator

Save on Google

Free online llms.txt checker. Paste your file and see errors, warnings and tips with line numbers. Everything runs in your browser. Nothing is uploaded.

Paste llms.txt

Results & Output

    The output box shows your file cleaned up: LF line breaks, no trailing spaces, one blank line between blocks and - bullets.

    What does an llms.txt validator check?

    The validator checks that your llms.txt follows the proposed Markdown format: one # title, an optional > summary, and ## sections of links written as - [Name](url): note. It flags missing or broken pieces so you can fix them before uploading the file to /llms.txt.

    llms.txt validation rules: 70 checks and specifications

    Severity is a recommended level. The validator above checks the title, summary, sections, links, URLs and size. Server and agent rows are reference only. Rules of thumb are labelled as such, and rows marked Unverified are items I could not confirm.

    Showing 70 of 70 validation rules & specifications
    Validation Rule / Parser QuerySpecification Standard & Error FixSeverity LevelScope / Category
    Missing single H1 titleExactly one # Title line must come first. Fix: add # Your site name at the top.Fatal ErrorAnatomy & H1
    Multiple H1 headings detectedOnly one # Title is allowed. Fix: change later titles to ## Section.Fatal ErrorAnatomy & H1
    Non-UTF-8 encoding detectedSave as UTF-8. Curly quotes and accented letters are valid UTF-8, but bytes that are not valid UTF-8 can garble the file or make a tool reject it. Fix: re-save as UTF-8.Fatal ErrorServer & Encoding
    Trailing spaces in H1 headerTrailing spaces after # Title can leak into the parsed title in some tools. Fix: trim the line.WarningAnatomy & H1
    Missing blockquote summaryThe proposal recommends > Short project summary right after the H1. Fix: add one or two factual sentences.WarningSummary Block
    Multi-line blockquote syntaxStart every line of a multi-line summary with >, or keep the summary on one line.Best PracticeSummary Block
    Summary preceding H1The # Title must come before any > summary. Fix: move the title to line 1.Fatal ErrorSummary Block
    Empty file validationA file with 0 bytes or only whitespace has no title or links. Fix: add a title and at least one link.Fatal ErrorAnatomy & H1
    Case sensitivity of filenameUse lowercase llms.txt. On a case-sensitive server LLMS.txt returns 404, so tools never find it.Fatal ErrorServer & Encoding
    Default root path validationHost it at the root of the domain: https://example.com/llms.txt.Spec RequirementServer & Encoding
    Subdirectory placement validationThe proposal also allows a file in a subpath for an isolated docs section, for example https://example.com/docs/llms.txt.Best PracticeServer & Encoding
    HTML tags in MarkdownUse plain Markdown. HTML tags are not part of the format and may show as raw text. This validator flags them.WarningAnatomy & H1
    Leading blank lines before H1This validator ignores blank lines before the title, but a strict parser may expect the H1 on line 1. Fix: remove them.WarningAnatomy & H1
    BOM (byte order mark) presenceA UTF-8 BOM can break strict Markdown parsers or show as stray characters before the title. Fix: save as UTF-8 without BOM.WarningServer & Encoding
    Line ending consistency (LF vs CRLF)Prefer Unix LF line breaks. This validator accepts CRLF too.Best PracticeServer & Encoding
    Unrecognized H2 section headerSection names are free-form. Clear names such as ## Docs, ## API Reference or ## Guides help. Only ## Optional has a defined meaning.Best PracticeSections
    H3 or H4 sub-headings usageHeadings below ## are not part of the format. This validator reports them as tips. Fix: use flat ## sections.Best PracticeSections
    Missing section headersLinks need a ## section. Fix: add ## Docs above the first list. This validator warns about list items before the first section.WarningSections
    Duplicate section namesRepeating a ## Section name makes the file confusing. Fix: merge or rename the sections.WarningSections
    The `## Optional` section ruleUse one ## Optional section, last in the file, for links a tool may skip when it needs a shorter context.Spec RequirementSections
    Empty section headersA ## heading with no links is flagged by this validator. Fix: add links or delete the heading.WarningSections
    Narrative paragraph placementPlain paragraphs are allowed between the summary and the first ## section. Text inside a section is reported as a tip.Spec RequirementSections
    Excessive paragraph lengthKeep paragraphs short, as a rule of thumb under about 500 characters, because long text uses token budget.Best PracticeSections
    Code fences in root fileAvoid fenced code blocks (three backticks) in the index. Put long examples in /llms-full.txt.Best PracticeSections
    Horizontal rule usage (---)A --- rule is not part of the format and adds nothing. Fix: remove it.Best PracticeSections
    Bulleted list type mismatchUse hyphens: - [Name](url). This validator accepts * too, but the proposal examples use -.Best PracticeSections
    Numbered lists for linksUse bullet lists, not 1. lists, so each link line matches the standard pattern.Best PracticeSections
    Nested lists inside linksKeep one flat level. Indented sub-bullets can be missed by simple link extractors.Best PracticeSections
    Canonical link syntax- [Title](https://example.com/page): Optional notesSpec RequirementLinks & URLs
    Missing link title bracket-[Title(url) is broken. Fix: - [Title](https://example.com/page).Fatal ErrorLinks & URLs
    Missing URL parentheses[Title]https://example.com is broken. Fix: wrap the URL: [Title](https://example.com).Fatal ErrorLinks & URLs
    Missing colon before noteWrite [Title](url): note. Note text after the link without the colon makes the line invalid in this validator.Fatal ErrorLinks & URLs
    Relative vs absolute URLsUse absolute URLs such as https://example.com/docs so a tool needs no base domain.Best PracticeLinks & URLs
    Missing protocol in URLexample.com/doc and /doc are not absolute. Fix: start the URL with https://. This validator reports it as an error.Fatal ErrorLinks & URLs
    Insecure HTTP URLshttp:// links are flagged. Fix: use https:// where the site supports it.WarningLinks & URLs
    Dead or 404 linksThis validator cannot check them, because a browser page cannot request other sites. Test links with a crawler and fix any 404.WarningLinks & URLs
    Redirect chains (301/302)Link to the final URL. Redirects cost extra requests, and a tool may stop following them.WarningLinks & URLs
    Trailing slash mismatches/docs and /docs/ can be different URLs. Use the exact form your server returns with 200.WarningLinks & URLs
    URL fragment identifiers (#hash)A #section part points inside one page. Many tools fetch the whole page, so the fragment may be ignored.Best PracticeLinks & URLs
    Query parameters in linksRemove tracking parameters such as ?utm_source= and keep only parameters that change the content.WarningLinks & URLs
    Linking HTML instead of raw MarkdownWhere you have clean Markdown versions, link them, for example page.md. They use fewer tokens than HTML.Best PracticeLinks & URLs
    Duplicate URL entriesList each URL once. This validator flags repeats and shows the line of the first use.WarningLinks & URLs
    File size exceeding 50 KBThere is no official limit. As a rule of thumb, keep /llms.txt under about 50 KB. This validator warns above 20,000 characters.Best PracticeSize & Tokens
    Token count exceeding 10,000 tokensA practical target is under about 10,000 tokens, at roughly 4 characters per token. Move depth into /llms-full.txt.Best PracticeSize & Tokens
    Excessive link densityA very long list dilutes your key pages and tools may truncate it. As a rule of thumb, stay near a few dozen links and use ## Optional for the rest.Best PracticeSize & Tokens
    Vague link descriptionsNotes such as “docs” or “click here” tell a model nothing. Fix: say what the page covers.Best PracticeSize & Tokens
    Optimal link description lengthAs a rule of thumb, keep notes between 5 and 25 words.Best PracticeSize & Tokens
    Difference between /llms.txt and /llms-full.txt/llms.txt is an index of links. /llms-full.txt is a common companion convention that holds full page text in one file.Best PracticeSize & Tokens
    Circular linking to /llms.txtThe file does not need to link to itself. Remove such a link to save space.Best PracticeLinks & URLs
    Binary file linkingLinks to PDFs, ZIPs or images give a text-only tool nothing to read. Link a text or Markdown version instead.WarningLinks & URLs
    Authenticated or paywalled URLsLinks that return 401 or 403 cannot be read by public tools. Remove them or provide a public version.WarningLinks & URLs
    Rate-limited endpoints (429)A docs host that returns 429 to automated requests can stop tools from reading your links. Check your rate limits.WarningLinks & URLs
    Caching headers (Cache-Control)Cache-Control: public, max-age=86400 caches the file for one day. Use less if you update it often.Best PracticeServer & Encoding
    Compression support (Gzip/Brotli)Serve it with Content-Encoding: gzip or br. Text compresses well and clients decompress it automatically.Best PracticeServer & Encoding
    Correct MIME type headerThe proposal does not mandate one. Use text/plain; charset=utf-8 or text/markdown; charset=utf-8.Best PracticeServer & Encoding
    Incorrect MIME type (text/html)A file served as text/html may render as a web page or be rejected. Fix: return a text type.WarningServer & Encoding
    Missing CORS headerAccess-Control-Allow-Origin: * is only needed when browser-based tools on other origins fetch the file. Server-side tools do not need it.Best PracticeServer & Encoding
    Robots.txt disallow on rootIf robots.txt disallows /llms.txt or /, compliant crawlers will not fetch the file.WarningServer & Encoding
    Robots.txt explicit allow ruleAdd Allow: /llms.txt inside a group that otherwise blocks the site.Best PracticeServer & Encoding
    Nginx location block configurationlocation = /llms.txt { default_type text/markdown; charset utf-8; }Best PracticeServer & Encoding
    Apache .htaccess configuration<Files "llms.txt"> ForceType "text/markdown; charset=utf-8" </Files> Avoid AddType ... .txt, which changes every .txt file.Best PracticeServer & Encoding
    Cloudflare edge rule compatibilityCloudflare minification and Rocket Loader only touch HTML, CSS and JS. Still check the response headers and make sure no WAF or bot rule blocks /llms.txt.Best PracticeServer & Encoding
    Next.js static route generationPut the file in public/llms.txt, or return text from a Route Handler such as app/llms.txt/route.ts.Best PracticeMaintenance
    Astro documentation integrationGenerate it from your docs collection with an endpoint such as src/pages/llms.txt.ts.Best PracticeMaintenance
    Cursor IDE automated discoveryI could not confirm that Cursor reads /llms.txt automatically. Cursor can add documentation from a URL, so test with your own link.UnverifiedAgent Ingestion
    Windsurf context ingestionI could not confirm a built-in llms.txt parser in Windsurf. Paste the file or its URL as context and check Windsurf’s docs.UnverifiedAgent Ingestion
    LangChain document loader validationI am not aware of a loader named LLMSTxtLoader. Load the URL with a generic web loader, then split on ## headings.UnverifiedAgent Ingestion
    LlamaIndex reader complianceDownload the file and read it with a Markdown reader, or load the URL with a web page reader. Check the current LlamaIndex docs.UnverifiedAgent Ingestion
    Automated CI/CD syntax testingRun a validation script in GitHub Actions before deploy, and fail the build on errors or on a listed link returning 404.Best PracticeMaintenance
    Syncing llms.txt with Git releasesRegenerate the link index when you publish a new version, and move old versions to ## Optional.Best PracticeMaintenance

    llms.txt validator FAQ

    QuestionAnswer
    How do I validate an llms.txt file?Paste the file into a validator such as the one above. It checks the title, summary, sections, link format, URL scheme, duplicates and size, and reports problems with line numbers. It cannot test whether links load, so open them or run a crawler too.
    What are the most common syntax errors in llms.txt?The most common errors are a missing or duplicate # title, list items not written as - [Name](url): note, relative or http:// URLs, empty sections, and more than one Optional section.
    What is the required format for links in llms.txt?Write each link as - [Title](https://example.com/page): Optional note. The link is required, and the note after the colon is optional but recommended. Use absolute https URLs.
    Can an llms.txt file have multiple H1 titles?No. Use exactly one # title at the top and ## for sections. A second H1 can confuse parsers, and this validator reports it as an error.
    What is the difference between llms.txt and llms-full.txt?llms.txt is an index of links with short notes. llms-full.txt is a common companion convention, not part of the core proposal, that holds the full text of key pages in one file.
    What MIME type should be used for serving llms.txt?The proposal does not mandate one. Serve it as text/plain; charset=utf-8 or text/markdown; charset=utf-8 so browsers show the text instead of downloading it or rendering it as HTML.
    Where should the llms.txt file be hosted?At the root of your domain, for example https://example.com/llms.txt. The proposal also allows a file in a subpath for a docs section, and each subdomain needs its own file.
    How do AI agents like Cursor or Windsurf parse llms.txt?I could not confirm that Cursor or Windsurf read llms.txt automatically. Both can take documentation from a URL or pasted text as context, so give them your llms.txt link or its contents and test the result.