{ ILoveJS }

URL Encode Text

Encode all characters in text using percent-encoding.

urlencodepercent-encoding

What is URL Encode Text?

URL Encode Text is a developer utility that applies full percent-encoding to every character in a given string — not just the reserved or unsafe ones, but every single character. Each character is converted to its UTF-8 byte representation and prefixed with a percent sign (%), producing output like %48%65%6C%6C%6F for the word 'Hello'. This is distinct from standard URL encoding, which leaves alphanumeric characters untouched.

This level of encoding is useful when you need guaranteed safe transmission of arbitrary text through a URL, a header, or any channel that is strict about character interpretation. It eliminates any ambiguity about which characters might be interpreted as delimiters, control sequences, or special tokens by an intermediary system. For developers working with APIs, authentication systems, or low-level protocol handling, having full control over the encoding output is essential.

How to Use

Using the tool is straightforward: paste or type any string into the input field and the fully percent-encoded output is generated instantly. Every character — letters, digits, punctuation, spaces, Unicode — is encoded without exception. For example, the input 'hello world' becomes '%68%65%6C%6C%6F%20%77%6F%72%6C%64', where even the standard alphanumeric characters are encoded rather than left as-is.

The tool handles multibyte Unicode characters correctly by first encoding the string as UTF-8 and then percent-encoding each resulting byte. This means a character like '€' (U+20AC) will correctly produce '%E2%82%AC', reflecting its three-byte UTF-8 representation rather than a single incorrect value. This is the behavior defined by the WHATWG URL specification for application/x-www-form-urlencoded contexts.

One important edge case to be aware of: this tool encodes all characters without exception. If you only need to encode reserved or unsafe characters while leaving alphanumerics intact — as is common for query string values — a standard URL encoder is more appropriate. Full percent-encoding is best suited for scenarios where maximum safety and explicitness are required, such as embedding data in custom protocols, generating test payloads, or auditing exactly how a string will look when fully serialized.

Use Cases

API authentication tokens: When embedding a raw token or secret in a URL or Authorization header, fully percent-encoding it ensures no character is misinterpreted as a delimiter or control character by a proxy or gateway.
Test payload generation: QA engineers and security researchers use full percent-encoding to craft precise HTTP request payloads where every byte must be explicitly represented, making it easier to reproduce and document edge-case behavior.
Custom protocol data embedding: When building custom URI schemes or deep links for mobile apps, fully encoding the payload portion prevents any part of the data from being parsed as structural URL components by the OS or browser.
Debug and audit encoding pipelines: Developers diagnosing double-encoding bugs or verifying encoding consistency can use full percent-encoding output as a known baseline to compare against the output of their own encoding logic.

Related Tools