Encode / decode a URL

Encode or decode text in URL format (percent-encoding), for example for query parameters.

Example:

Why encode a URL?

When you build a link or an API call by hand, a parameter containing spaces, accents, or special characters (&, =, ?, /) can break the URL or be misinterpreted by the server. Percent-encoding replaces these characters with %XX sequences that are safe to transmit in a query string, a header, or a form. This is typically what a developer does before inserting a user value (name, address, search term) into a shareable link or a fetch request.

Why does my URL contain %20 or %C3%A9?

These are percent-encoded characters: %20 represents a space and %C3%A9 represents an "é" encoded in UTF-8. A browser or web server automatically replaces certain characters not allowed in a URL with this notation to ensure the link remains valid and is transmitted without error.

What's the difference between encodeURIComponent and encodeURI?

This tool encodes text the way encodeURIComponent does: it escapes all non-alphanumeric characters except - _ . ~, including /, :, ?, &, and =. This is the appropriate behavior for encoding the value of a single parameter (before inserting it into a query string), unlike encodeURI, which preserves the structural separators of a complete URL.

100% local processing: encoding and decoding run entirely in your browser via WebAssembly, no entered text is sent to a server.