HeEx Formatter
The HeEx Formatter provides consistent formatting for HeEx templates to improve readability and maintainability for Elixir Phoenix projects.
Tool coming soon!
We're working hard to get this tool ready for you.
Worked Example & Common Values
Below is a sample worked calculation demonstrating how HeEx Formatter processes input data instantly inside your browser.
Minified string: {"id":1,"status":"active","roles":["admin"]}
{
"id": 1,
"status": "active",
"roles": [
"admin"
]
}
Build Your Own Custom Web Calculator in Seconds
Type what tool or calculator you need below. Our AI will build it instantly for your site.
About This Tool
Under the hood, the tool performs a token-guided reflow: it tokenizes the template, tracks tags, attributes, and embedded Elixir, computes optimal line breaks based on max_line_length, and then reconstructs the code with standardized indentation. It preserves comments, HTML-like attributes, and notations such as assigns and liveview slots. Advanced options let you set indent sizes (2 or 4 spaces), a preferred maximum line length, and attribute wrapping strategy (wrap when necessary vs. align attributes).
Who benefits: Elixir developers, code reviewers, and teams maintaining Phoenix apps benefit from reduced review time, consistent aesthetics, and easier diff reviews. Unique value: domain-aware formatting for HeEx templates, support for LiveView constructs, and easy CI or pre-commit integration. Use cases include standardizing style before PRs, onboarding new contributors, and enforcing a team-wide code base standard without manual edits.
How to Use
- Provide inputs: raw HeEx code string and optional formatting preferences.
- Set options: indent size, max line length, and wrap strategy.
- Run formatter: apply the formatting rules to the input template.
- Review outputs: inspect the formatted HeEx code for correctness and style compliance.
- Save/export: copy or export the formatted code to the project files or CI pipeline.
Frequently Asked Questions
Find Quick Answers
Can it format partial templates or fragments?
Does it preserve comments and string literals?
Can it be integrated with CI or pre-commit hooks?
Does the formatter reorder attributes or alter logic blocks?
Need to run multiple calculations?
Create a free account today to unlock unlimited daily runs, access advanced parameters, save your history, and request custom features.
Related Tools
Other useful calculators and utilities you might like
Spotify to MP3 Converter
Convert Spotify tracks and playlists to MP3 format instantly with our free online converter.
Road Distance Calculator
Calculate the driving distance and travel time between two addresses with our free online road dista...
Your Feedback Matters
Help Us to Improve
Norwegian
Danish
German
English
Spanish
French
Italian
Dutch
Portuguese
Swedish
Hebrew
Arabic