URL-Encode a String
Turn text into a percent-encoded string suitable for a query value. The default uses `encodeURIComponent`, which leaves unreserved characters such as letters, digits and `-_.!~*'()` as they are. Turn on the option to encode every character if you want each one as a `%` plus uppercase hex.
This tool runs in your web browser: your files and text are processed on your device and are not uploaded to TidyKit servers. Free, no sign-up.
How to encode
1. Paste the text. 2. Leave the default, or turn on encoding of all characters. 3. Copy the result.
`Lisbon café` becomes `Lisbon%20caf%C3%A9` with the default. With every character encoded, letters such as `L` also become percent escapes.
Privacy and limits
Encoding stays in this tab. This encodes a string, it does not build a full URL. Characters that `encodeURIComponent` considers safe are left literal unless you choose to encode everything. To decode the result, use the URL-decode tool.
Frequently asked questions
Why are some letters not encoded?
The default follows `encodeURIComponent`. Unreserved characters stay as they are. Turn on the all-characters option to encode those too.
Is my text uploaded?
No.
Is this the same as encodeURI?
No. `encodeURIComponent` also encodes characters such as `&`, `?` and `/`, which is what you usually want for a single query value.
Are spaces encoded as `%20` or `+`?
As `%20`. A plus sign is not used.
More Text Tools
- Base64 Encoder/Decoder – Encode or decode data using Base64.
- Bcrypt – Hash strings with Bcrypt
- Text Censor – Quickly mask bad words or replace them with alternative words.
- Create palindrome – Create text that reads the same forward and backward
- Email Extractor – Extract email addresses from text
- Extract substring – Extract a portion of text between specified positions
- Hidden Character Detector – Find hidden Unicode characters in text
- Join Text – Join text elements with a specified separator
- Palindrome – Check if text reads the same forward and backward
- Password Generator – Generate secure random passwords with custom options
- Text Quoter – Add quotes around text with various styles
- Randomize case – Randomize the case of letters in text
- Remove duplicate lines – Quickly delete all repeated lines from text
- Repeat Text – Repeat text multiple times
- Text Replacer – Quickly replace text in your content
- Reverse – Reverse any text character by character
- ROT13 Encoder/Decoder – Encode or decode text using ROT13 cipher.
- Rotate Text – Shift characters in text by position.
- Slug Generator – Generate URL-friendly slugs from text.
- Split – Split text into multiple parts using a separator
- Text Statistics – Get statistics about your text
- Table Text Converter – Convert tables between Markdown, CSV, HTML, MySQL, and JSON
- Compare Texts – Compare two texts and spot differences instantly
- String To morse – Quickly encode text to morse
- Truncate Text – Truncate text to a specified length
- Unicode Encoder / Decoder – Encode or decode text using Unicode escape sequences.
- Convert to Uppercase – Convert text to uppercase
- String URL decoder – Quickly URL-unescape a string.
- URL Editor – Inspect and edit URL components and query parameters.