SafeToolkits

ERB Beautify/Minify

Pretty-print or minify ERB templates.

Runs in your browser: what you paste is never uploaded

How to use ERB Beautify/Minify

  1. 1Paste or type your inputUse the box above, or click Sample to try it with an example.
  2. 2Choose your optionsChoose Beautify or Minify, and the indent size.
  3. 3Copy the resultCopy it with one click. Nothing is sent anywhere.

About ERB Beautify/Minify

Format Ruby on Rails ERB templates, indenting the HTML while keeping <% %> and <%= %> tags intact, or minify them.

Frequently asked questions

Is the Ruby code inside tags changed?

No. ERB tags are kept exactly as written; only the surrounding HTML is reformatted.

Does it work for other templates?

It's tuned for ERB. Other template syntaxes may not be recognised.

Is what I paste sent anywhere?

No. The tool runs entirely in your browser and never sends what you type or paste to a server.

Is it free?

Yes. It's free, with no sign-up and no limits.

Related tools