Dev Helpers
← Back

Decode an international domain

Decode an international domain using Node.js.

Open this example in the interactive library

Source code

import {
  URL,
  domainToASCII,
  domainToUnicode,
  pathToFileURL,
  fileURLToPath,
} from "node:url";
console.log(domainToUnicode("xn--caf-dma.example"));

Sample output

café.example