llms.txt validator
Save on GoogleFree 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.
| Validation Rule / Parser Query | Specification Standard & Error Fix | Severity Level | Scope / Category |
|---|---|---|---|
| Missing single H1 title | Exactly one # Title line must come first. Fix: add # Your site name at the top. | Fatal Error | Anatomy & H1 |
| Multiple H1 headings detected | Only one # Title is allowed. Fix: change later titles to ## Section. | Fatal Error | Anatomy & H1 |
| Non-UTF-8 encoding detected | Save 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 Error | Server & Encoding |
| Trailing spaces in H1 header | Trailing spaces after # Title can leak into the parsed title in some tools. Fix: trim the line. | Warning | Anatomy & H1 |
| Missing blockquote summary | The proposal recommends > Short project summary right after the H1. Fix: add one or two factual sentences. | Warning | Summary Block |
| Multi-line blockquote syntax | Start every line of a multi-line summary with >, or keep the summary on one line. | Best Practice | Summary Block |
| Summary preceding H1 | The # Title must come before any > summary. Fix: move the title to line 1. | Fatal Error | Summary Block |
| Empty file validation | A file with 0 bytes or only whitespace has no title or links. Fix: add a title and at least one link. | Fatal Error | Anatomy & H1 |
| Case sensitivity of filename | Use lowercase llms.txt. On a case-sensitive server LLMS.txt returns 404, so tools never find it. | Fatal Error | Server & Encoding |
| Default root path validation | Host it at the root of the domain: https://example.com/llms.txt. | Spec Requirement | Server & Encoding |
| Subdirectory placement validation | The proposal also allows a file in a subpath for an isolated docs section, for example https://example.com/docs/llms.txt. | Best Practice | Server & Encoding |
| HTML tags in Markdown | Use plain Markdown. HTML tags are not part of the format and may show as raw text. This validator flags them. | Warning | Anatomy & H1 |
| Leading blank lines before H1 | This validator ignores blank lines before the title, but a strict parser may expect the H1 on line 1. Fix: remove them. | Warning | Anatomy & H1 |
| BOM (byte order mark) presence | A UTF-8 BOM can break strict Markdown parsers or show as stray characters before the title. Fix: save as UTF-8 without BOM. | Warning | Server & Encoding |
| Line ending consistency (LF vs CRLF) | Prefer Unix LF line breaks. This validator accepts CRLF too. | Best Practice | Server & Encoding |
| Unrecognized H2 section header | Section names are free-form. Clear names such as ## Docs, ## API Reference or ## Guides help. Only ## Optional has a defined meaning. | Best Practice | Sections |
| H3 or H4 sub-headings usage | Headings below ## are not part of the format. This validator reports them as tips. Fix: use flat ## sections. | Best Practice | Sections |
| Missing section headers | Links need a ## section. Fix: add ## Docs above the first list. This validator warns about list items before the first section. | Warning | Sections |
| Duplicate section names | Repeating a ## Section name makes the file confusing. Fix: merge or rename the sections. | Warning | Sections |
| The `## Optional` section rule | Use one ## Optional section, last in the file, for links a tool may skip when it needs a shorter context. | Spec Requirement | Sections |
| Empty section headers | A ## heading with no links is flagged by this validator. Fix: add links or delete the heading. | Warning | Sections |
| Narrative paragraph placement | Plain paragraphs are allowed between the summary and the first ## section. Text inside a section is reported as a tip. | Spec Requirement | Sections |
| Excessive paragraph length | Keep paragraphs short, as a rule of thumb under about 500 characters, because long text uses token budget. | Best Practice | Sections |
| Code fences in root file | Avoid fenced code blocks (three backticks) in the index. Put long examples in /llms-full.txt. | Best Practice | Sections |
| Horizontal rule usage (---) | A --- rule is not part of the format and adds nothing. Fix: remove it. | Best Practice | Sections |
| Bulleted list type mismatch | Use hyphens: - [Name](url). This validator accepts * too, but the proposal examples use -. | Best Practice | Sections |
| Numbered lists for links | Use bullet lists, not 1. lists, so each link line matches the standard pattern. | Best Practice | Sections |
| Nested lists inside links | Keep one flat level. Indented sub-bullets can be missed by simple link extractors. | Best Practice | Sections |
| Canonical link syntax | - [Title](https://example.com/page): Optional notes | Spec Requirement | Links & URLs |
| Missing link title bracket | -[Title(url) is broken. Fix: - [Title](https://example.com/page). | Fatal Error | Links & URLs |
| Missing URL parentheses | [Title]https://example.com is broken. Fix: wrap the URL: [Title](https://example.com). | Fatal Error | Links & URLs |
| Missing colon before note | Write [Title](url): note. Note text after the link without the colon makes the line invalid in this validator. | Fatal Error | Links & URLs |
| Relative vs absolute URLs | Use absolute URLs such as https://example.com/docs so a tool needs no base domain. | Best Practice | Links & URLs |
| Missing protocol in URL | example.com/doc and /doc are not absolute. Fix: start the URL with https://. This validator reports it as an error. | Fatal Error | Links & URLs |
| Insecure HTTP URLs | http:// links are flagged. Fix: use https:// where the site supports it. | Warning | Links & URLs |
| Dead or 404 links | This validator cannot check them, because a browser page cannot request other sites. Test links with a crawler and fix any 404. | Warning | Links & URLs |
| Redirect chains (301/302) | Link to the final URL. Redirects cost extra requests, and a tool may stop following them. | Warning | Links & URLs |
| Trailing slash mismatches | /docs and /docs/ can be different URLs. Use the exact form your server returns with 200. | Warning | Links & 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 Practice | Links & URLs |
| Query parameters in links | Remove tracking parameters such as ?utm_source= and keep only parameters that change the content. | Warning | Links & URLs |
| Linking HTML instead of raw Markdown | Where you have clean Markdown versions, link them, for example page.md. They use fewer tokens than HTML. | Best Practice | Links & URLs |
| Duplicate URL entries | List each URL once. This validator flags repeats and shows the line of the first use. | Warning | Links & URLs |
| File size exceeding 50 KB | There is no official limit. As a rule of thumb, keep /llms.txt under about 50 KB. This validator warns above 20,000 characters. | Best Practice | Size & Tokens |
| Token count exceeding 10,000 tokens | A practical target is under about 10,000 tokens, at roughly 4 characters per token. Move depth into /llms-full.txt. | Best Practice | Size & Tokens |
| Excessive link density | A 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 Practice | Size & Tokens |
| Vague link descriptions | Notes such as “docs” or “click here” tell a model nothing. Fix: say what the page covers. | Best Practice | Size & Tokens |
| Optimal link description length | As a rule of thumb, keep notes between 5 and 25 words. | Best Practice | Size & 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 Practice | Size & Tokens |
| Circular linking to /llms.txt | The file does not need to link to itself. Remove such a link to save space. | Best Practice | Links & URLs |
| Binary file linking | Links to PDFs, ZIPs or images give a text-only tool nothing to read. Link a text or Markdown version instead. | Warning | Links & URLs |
| Authenticated or paywalled URLs | Links that return 401 or 403 cannot be read by public tools. Remove them or provide a public version. | Warning | Links & 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. | Warning | Links & 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 Practice | Server & Encoding |
| Compression support (Gzip/Brotli) | Serve it with Content-Encoding: gzip or br. Text compresses well and clients decompress it automatically. | Best Practice | Server & Encoding |
| Correct MIME type header | The proposal does not mandate one. Use text/plain; charset=utf-8 or text/markdown; charset=utf-8. | Best Practice | Server & 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. | Warning | Server & Encoding |
| Missing CORS header | Access-Control-Allow-Origin: * is only needed when browser-based tools on other origins fetch the file. Server-side tools do not need it. | Best Practice | Server & Encoding |
| Robots.txt disallow on root | If robots.txt disallows /llms.txt or /, compliant crawlers will not fetch the file. | Warning | Server & Encoding |
| Robots.txt explicit allow rule | Add Allow: /llms.txt inside a group that otherwise blocks the site. | Best Practice | Server & Encoding |
| Nginx location block configuration | location = /llms.txt { default_type text/markdown; charset utf-8; } | Best Practice | Server & Encoding |
| Apache .htaccess configuration | <Files "llms.txt"> ForceType "text/markdown; charset=utf-8" </Files> Avoid AddType ... .txt, which changes every .txt file. | Best Practice | Server & Encoding |
| Cloudflare edge rule compatibility | Cloudflare 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 Practice | Server & Encoding |
| Next.js static route generation | Put the file in public/llms.txt, or return text from a Route Handler such as app/llms.txt/route.ts. | Best Practice | Maintenance |
| Astro documentation integration | Generate it from your docs collection with an endpoint such as src/pages/llms.txt.ts. | Best Practice | Maintenance |
| Cursor IDE automated discovery | I could not confirm that Cursor reads /llms.txt automatically. Cursor can add documentation from a URL, so test with your own link. | Unverified | Agent Ingestion |
| Windsurf context ingestion | I could not confirm a built-in llms.txt parser in Windsurf. Paste the file or its URL as context and check Windsurf’s docs. | Unverified | Agent Ingestion |
| LangChain document loader validation | I am not aware of a loader named LLMSTxtLoader. Load the URL with a generic web loader, then split on ## headings. | Unverified | Agent Ingestion |
| LlamaIndex reader compliance | Download the file and read it with a Markdown reader, or load the URL with a web page reader. Check the current LlamaIndex docs. | Unverified | Agent Ingestion |
| Automated CI/CD syntax testing | Run a validation script in GitHub Actions before deploy, and fail the build on errors or on a listed link returning 404. | Best Practice | Maintenance |
| Syncing llms.txt with Git releases | Regenerate the link index when you publish a new version, and move old versions to ## Optional. | Best Practice | Maintenance |
llms.txt validator FAQ
| Question | Answer |
|---|---|
| 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. |