Кодирование / Декодирование URL
В тренде 🔥Кодируйте или декодируйте компоненты URL.
Как использовать Кодирование / Декодирование URL
- 1Вставьте текст
- 2Нажмите Кодировать для перевода в URL-формат или Декодировать — обратно
- 3Скопируйте результат
О Кодирование / Декодирование URL
URL Кодировать/Декодировать конвертирует текст в URL-кодировку и обратно.
Ключевые возможности Кодирование / Декодирование URL
- Encode text to URL-safe percent-encoded format instantly
- Decode percent-encoded strings back to readable text
- Supports both encodeURIComponent and full URI encoding modes
- Handles Unicode characters, spaces, and all special characters
- One-click copy for encoded and decoded output
- Works entirely in-browser — no data is sent to any server
- Instant results with no submit button required
- Useful for debugging malformed URLs and query strings
Поддерживаемые форматы
Входные форматы
Выходные форматы
Использует семантику encodeURIComponent / decodeURIComponent.
Примеры
Encode a search query for use in a URL
Make a user-entered search term safe to append to a URL query string.
Входные данные
hello world & more
Результат
hello%20world%20%26%20more
Decode a percent-encoded API parameter
Convert a percent-encoded string from an API log back to readable text.
Входные данные
email%3Duser%40example.com%26name%3DJohn%20Doe
Результат
email=user@example.com&name=John Doe
Типичные сценарии использования
- Encoding user-submitted form data before appending to a URL
- Decoding percent-encoded query parameters in API logs for debugging
- Preparing special characters for use in redirect URLs
- Encoding email addresses or JSON values for URL query strings
- Debugging broken URLs that contain unencoded reserved characters
- Preparing URL parameters for OAuth 1.0 signature base strings
Устранение неполадок
Spaces appear as + instead of %20
Решение
Plus signs (+) encode spaces in application/x-www-form-urlencoded format. Use %20 for spaces in standard URL encoding.
Encoding a full URL changes the slashes and colons
Решение
Only encode individual parameter values with encodeURIComponent, not entire URLs.
Double-encoded strings like %2520 appear in the output
Решение
This happens when you encode an already-encoded string. Decode first, then re-encode.
Часто задаваемые вопросы
What is URL encoding?
URL encoding (percent encoding) converts characters not allowed in URLs to a % followed by their two-digit hex code. For example, a space becomes %20 and an ampersand becomes %26.
When do I need URL encoding?
You need URL encoding whenever you pass special characters (spaces, &, =, ?, #) as values in query strings, form submissions, or API parameters.
What is the difference between encodeURI and encodeURIComponent?
encodeURI encodes a complete URL and leaves structural characters (/, :, ?, #, &) intact. encodeURIComponent encodes everything including those structural characters, making it suitable for individual query parameter values.
Why does a space sometimes appear as + in URLs?
The + sign is an older, HTML form-specific way to encode spaces. Standard percent encoding uses %20. Both are widely used, but %20 is correct per RFC 3986.
Is URL encoding the same as Base64 encoding?
No. URL encoding converts characters to %XX hex format for URLs. Base64 encoding converts binary data to printable ASCII for text-based protocols.
Can I encode an entire URL?
You can, but typically you should only encode individual query parameter values. Encoding a full URL will also encode the scheme and slashes, making it invalid.
Is my data sent to a server?
No. All encoding and decoding is performed locally in your browser. No data is transmitted or stored.
What characters are not encoded?
Unreserved characters — letters (A–Z, a–z), digits (0–9), hyphen (-), underscore (_), period (.), and tilde (~) — are never encoded as they are safe in URLs.