
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
An JavaScript implementation of Unicode Technical Standard #46: Unicode IDNA Compatibility Processing.
toASCII(domainName[, options])Converts a string of Unicode symbols to a case-folded Punycode string of ASCII symbols.
Available options:
checkBidicheckHyphenscheckJoinersignoreInvalidPunycodetransitionalProcessinguseSTD3ASCIIRulesverifyDNSLengthtoUnicode(domainName[, options])Converts a case-folded Punycode string of ASCII symbols to a string of Unicode symbols.
Available options:
checkBidiType: boolean
Default value: false
When set to true, any bi-directional text within the input will be checked for validation.
checkHyphensType: boolean
Default value: false
When set to true, the positions of any hyphen characters within the input will be checked for validation.
checkJoinersType: boolean
Default value: false
When set to true, any word joiner characters within the input will be checked for validation.
ignoreInvalidPunycodeType: boolean
Default value: false
When set to true, invalid Punycode strings within the input will be allowed.
transitionalProcessingType: boolean
Default value: false
When set to true, uses transitional (compatibility) processing of the deviation characters.
useSTD3ASCIIRulesType: boolean
Default value: false
When set to true, input will be validated according to STD3 Rules.
verifyDNSLengthType: boolean
Default value: false
When set to true, the length of each DNS label within the input will be checked for validation.
Punycode.js is a robust Punycode converter that fully complies with RFC 3492 and RFC 5891, and works on nearly all JavaScript platforms. This package is used to convert Unicode strings to Punycode and vice versa, similar to tr46's toASCII and toUnicode functions. However, tr46 provides additional processing options and is designed to comply with the TR46 algorithm.
The idna-uts46 package is a small library that converts a Unicode string to an ASCII string as per the IDNA2008 (UTS #46) standard. It is similar to tr46 in that it handles internationalized domain names, but it may have different API options and compliance specifics.
FAQs
An implementation of the Unicode UTS #46: Unicode IDNA Compatibility Processing
The npm package tr46 receives a total of 141,986,026 weekly downloads. As such, tr46 popularity was classified as popular.
We found that tr46 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.