IDN Encode a String
Encode an internationalized domain name to its ASCII (xn--) form. Runs entirely in your browser, so your data never leaves your device.
Runs on your device, nothing uploaded
0 chars · 0 lines
Output
Encode an internationalized domain name to its ASCII (xn--) form.
Type or paste above to see the result here.
What you paste never leaves this tab
IDN Encode a String is JavaScript that your browser has already downloaded, and it does the whole job on your own machine. On a normal site, the text you paste is sent to a server that can log it, cache it or keep it. Here it is read and transformed inside this tab and nowhere else.
- No upload
- No length limit
- Works offline once loaded
- Nothing stored or logged
How to use IDN Encode a String
- 1. Paste the Unicode domain. Enter the internationalized domain name into the input pane, including any accented or non-Latin characters, such as münchen.de.
- 2. Read how encoding works. Each line is converted on its own. A bare domain becomes its ASCII-compatible xn-- form; a URL or email address converts only its host, and URL paths are percent-encoded unless you turn that option off.
- 3. Copy the ASCII domain. Copy the encoded xn-- domain from the output pane and use it wherever a system, like a DNS record or an old form field, only accepts ASCII domain names.
When to use IDN Encode a String
IDN Encode a String converts a domain name containing accented or non-Latin characters into the ASCII-safe xn-- form that DNS and older systems require. Use it whenever you have a real-world internationalized domain and need its punycode equivalent for a config file, registrar or API call.
- Registering a domain with a domain registrar API. A registrar's API only accepts ASCII domain labels, but your client wants a domain with an umlaut. Encoding it to punycode first gives you the string the API expects.
- Configuring a DNS record for a non-English brand name. You're setting up a DNS zone file for a domain that includes non-Latin characters and the zone file format only supports ASCII labels, so you need the punycode form.
- Testing an old form that rejects Unicode input. A legacy signup form throws an error on any domain field with non-ASCII characters. Encoding the domain to its xn-- form first lets you get past that validation for testing.
- Comparing a domain against a punycode blocklist. A security tool maintains a blocklist of domains in their ASCII-compatible form. Encoding a Unicode domain you're checking lets you compare it directly against that list.
Examples
Encode
Input
münchen.de
Output
xn--mnchen-3ya.de
Domains, URLs and emails
Input
münchen.de https://bücher.example/straße?q=1 user@例え.jp
Output
xn--mnchen-3ya.de https://xn--bcher-kva.example/stra%C3%9Fe?q=1 user@xn--r8jz45g.jp
About the IDN Encode a String tool
IDN Encode a String does its work locally, right in the browser. Encode an internationalized domain name to its ASCII (xn--) form. There is no upload step, no queue and no account, and your data never travels over the network.
It belongs to the String Tools collection on EditSafely, a set of 159 small, focused String utilities that share the same instant, private workspace.
You can shape the output with the Also percent-encode URL paths setting, and the result refreshes the moment you change it. 2 worked examples further down the page show exactly what the tool produces for real inputs.
Running locally also makes the tool fast and dependable: results appear as soon as your input does, there is no server outage that can take it down mid-task, and confidential data can be processed without a second thought.
Frequently asked questions
Is IDN Encode a String free to use?
Yes, it is completely free. All 2,943 tools on EditSafely work without an account, a subscription or usage limits.
Is it safe to paste sensitive or confidential data?
Everything happens locally. Your browser downloads the tool's code once, then does all the processing itself; nothing you enter is transmitted, stored or logged. You can even go offline after the page loads and it will still work.
How much text can I process at once?
There is no fixed limit; your device's memory is the ceiling. Up to 10 MB the result updates as you type, after a short pause that grows with the size. Above 10 MB a Run button appears so typing stays smooth, and files open up to 50 MB. A very long result shows its first 2,000 lines on screen, while Copy and Download always include all of it.
Do I need to sign up or install anything?
No. The tool works in any modern browser on desktop, tablet or phone. There is no account to create, no extension to add and no software to install.
How do I use the result?
The output panel has a one-click copy button, and you can keep refining the input while you work; the result updates in place as you type.