Prompt Formatter
Normalize whitespace and structure in prompts.
About this tool
Paste a prompt and get it back with consistent whitespace: Windows line endings converted, trailing spaces removed, repeated spaces collapsed and no more than one blank line in a row. It changes spacing only, not the words.
How to use
How it works
The formatter converts CRLF to LF, strips spaces and tabs at the end of lines, collapses three or more newlines into two, replaces every run of two or more spaces or tabs with one space, and trims the ends. The same spacing rules apply to code or lists inside the prompt.
Worked example
Messy spacing
- Input
- You are a helpful assistant. Answer briefly.
- Output
- You are a helpful assistant. Answer briefly.
- Walkthrough
- The double space, trailing spaces and the three extra blank lines are gone, and the leading and trailing whitespace is trimmed.
Limitations
- Indentation is flattened, because any run of two or more spaces becomes one. Do not use it on code, YAML or nested lists where indentation matters.
- It does not reword, reorder or add structure such as headings.
Questions
How do I clean up a prompt?
Will it break code blocks in my prompt?
Does formatting reduce token count?
Is my prompt uploaded?
Features
- Whitespace normalization
- CRLF to LF
- Runs in your browser
Related resources
Guides and videos from around the web—opens on YouTube or the publisher’s site.
TensorFlow 2.0 Complete Course
freeCodeCamp.org
Practical ML stack context next to AI utilities.
Watch on YouTubeFinding mean, median, and mode
Khan Academy
Baseline stats for accuracy and evaluation helpers.
Watch on YouTube
- Machine Learning Crash Course
Google Developers
Official ML crash course pairing with metric calculators.
- OpenAI Research
OpenAI
Research notes for people exploring AI tooling trends.