Suggestions
LLMs.txt Lab logo LLMs.txt Lab

llms.txt Formatter & Beautifier

Format and clean an llms.txt file without changing its important content. Fix Markdown spacing, headings, lists and links, then preview and download the improved file.

1
Input
2
Format
3
Review & Export

Paste your llms.txt content

Paste the raw Markdown content of your llms.txt file. The formatter will fix spacing, headings, and links.

0 characters

What Is the llms.txt Formatter?

The llms.txt Formatter is a tool that takes an existing file and converts it into clean, consistent, readable Markdown without unnecessarily changing its meaning, URLs, descriptions, or section organization. It combines formatting, cleaning, beautifying, and repairing into a single workflow built around the principle of being lossless by default.

How the Formatter Works

When you click Format File, the tool parses your content as structured Markdown data rather than plain text, so it understands the difference between a project title, a summary blockquote, an introductory paragraph, and a link section. This lets it make precise, targeted corrections.

What the Formatter Fixes

The formatter corrects a wide range of common issues automatically. It normalizes heading spacing, standardizes list markers, and fixes colon spacing between a link and its description. It also normalizes blockquote spacing, corrects line endings, and removes trailing whitespace.

Formatter Modes

The Conservative mode applies only the safest, most unambiguous fixes. The Standard mode additionally normalizes blank lines and removes trailing whitespace. The Strict mode applies all Standard changes and enforces blank line separation between each structural block.

llms.txt Formatting Rules

Formatting rules follow the llms.txt proposal. Bullet lists should use standard hyphen markers, links must be formatted using Markdown brackets and parentheses, and sections should be clearly demarcated by headings. Headings must have a space after the hash symbol.

Before and After Example

A file with inconsistent spacing, mixed list markers (asterisks and hyphens), and missing blank lines will be transformed into a perfectly uniform document. The Difference view will highlight every single line that was modified so you can easily review the changes.

Formatter vs Cleaner vs Beautifier

While a cleaner might aggressively remove unused or malformed content, and a beautifier focuses purely on aesthetics, the Formatter performs structural normalization. It brings the syntax in line with parsing requirements while keeping your original content intact.

How Section Reordering Works

If enabled, the tool can automatically shift the "Optional" section to the bottom of the file as recommended by the standard. This ensures that context-limited AI systems process your most important primary resources first.

What the Tool Does Not Change

The Formatter will not delete your links, remove duplicate URLs, modify the wording of your descriptions, or change your external URLs. Any destructive or URL-altering changes are left for the Link Checker or manual review.

How to Format an llms.txt File

Simply paste your Markdown content into the input editor or provide a URL to a live file. Select your desired formatting mode and click Analyze. Review the changes in the Difference tab, and copy or download the finalized result.

Common Formatting Problems

The most common errors include missing spaces after heading hashes, inconsistent list markers, trailing spaces that can confuse parsers, and missing spaces between a link and its colon. The Formatter fixes all of these automatically.

Related Components

Questions you might have

Does formatting change my URLs?
The default Conservative mode should preserve URLs exactly. URL normalization should be a separate optional setting.
Is the summary required?
No. Only the H1 project or site name is required by the current proposal.
Are descriptions required?
No. Link descriptions after the colon are optional.
What does the Optional section mean?
It identifies secondary resources that compatible processors may omit when producing shorter context.
Does the formatter validate broken URLs?
It can detect malformed and duplicate URLs. Full HTTP-status checking should be handled by the llms.txt Link Checker.
Does formatting guarantee AI systems will use the file?
No. Formatting improves consistency and parser compatibility, but adoption and usage depend on the individual AI system. Chrome currently treats llms.txt as an emerging optional convention.
Does llms.txt replace sitemap.xml?
No. The proposal describes llms.txt as a curated overview, while a sitemap generally lists indexable pages for search engines.