Prompt Formatter

Normalize a prompt — line endings, trailing spaces, blank-line runs, bullet markers and wrapping — deterministically in your browser.

  • Runs locally in your browser
  • No upload required

Try it

Reflow prose lines at this width; leave empty to keep the line breaks.

Characters
33
Lines
4
Changes
Collapsed runs of three or more blank lines to one. · Unified 2 bullet marker(s) to "- ".
Do this:

  - step one
- step two

Supported formats

Input
text/plain, text/markdown
Output
text/plain, text/markdown

Privacy

Runs entirely in your browser. Your input is never uploaded, stored, or sent to a third party.

Processing
In your browser
Privacy level
Browser only

Normalized the prompt to 33 characters across 4 line(s).

How it works

  • Unified line endings to LF and trimmed trailing whitespace on every line.
  • Collapsed runs of three or more blank lines and unified bullet markers (outside fenced code).
  • Applied the optional prose wrap width without breaking inside fenced code.
  • Collapsed runs of three or more blank lines to one.
  • Unified 2 bullet marker(s) to "- ".

Methodology

  1. Unify CRLF/CR line endings to LF, remove zero-width markers and trim trailing whitespace per line.
  2. Collapse runs of three or more blank lines to a single blank line and unify `*`/`+` bullet markers to `-` outside fenced code.
  3. When a wrap width is given, wrap prose paragraphs at that width with a greedy word wrap; fenced code is left verbatim.

Usage

  1. Paste or type your prompt.
  2. Set an optional wrap width to reflow prose lines.
  3. Copy the normalized prompt; the findings list what changed.

Examples

These are examples, not current values: they use fixed inputs, while the interactive tool computes live results in your browser.

Messy whitespace and bullets

jsonSelect to copy
{
  "text": "Do this:\r\n\r\n\r\n  * step one   \r\n* step two"
}

Wrap at 40 columns

jsonSelect to copy
{
  "text": "word word word word word word word word word word word word word word word word word word word word",
  "wrapWidth": 40
}

Limitations

Why normalize a prompt

Consistent whitespace and bullet markers make prompts easier to review and diff, and inconsistent blank-line runs and trailing spaces inflate token counts and diffs. Normalizing first keeps the meaningful edits visible.

Frequently asked questions

Does formatting change what my prompt means?
No. Only whitespace, zero-width markers and list markers change; every word and character of meaning is preserved, and the tool lists each change it makes.
Is my prompt sent anywhere?
No. Formatting runs entirely in your browser; nothing is uploaded.

Sources

  1. Unicode Standard Annex #29: Unicode Text Segmentation — Unicode Consortium