|unlocalize Filter

forces one value to stay machine-readable.

Formatting Most Useful As Markdown

Argument
None
Requires
{% load l10n %}

Documentation

Formats one value without locale-aware formatting.

Template

{% load l10n %}
<input type="number" value="{{ price|unlocalize }}">

This is the one that saves you: a number in a form field, a data attribute, or a JavaScript literal has to keep its dot decimal separator, and a locale that uses a comma would otherwise break it.

More Formatting Filters

All Formatting Filters


Did we get something wrong? Is there a use case for the unlocalize filter that we should add? Please let us know.

Send Feedback

Official Documentation
This page last updated on August 20, 2026