UTILS.
Private by default
DNS

DNS Record Generator

Build a DNS record in zone-file format from a record type, host, value and TTL.

Your files stay on this device

Files are processed in your browser, never uploaded. The site downloads code and assets to run the tools. No accounts or trackers.

Use Download to save this tool as one HTML file for offline use.

Privacy →
— output appears here —

About this tool

Assemble one DNS zone-file line for an A, AAAA, CNAME, MX, TXT or NS record. Pick the type, fill in host, value and TTL, and the line is generated in your browser as you type.

The output is tab-separated in the usual zone-file order: name, TTL, class IN, type, then the data, for example @ 3600 IN A 192.0.2.1. An empty host becomes @ for the zone root, and an empty TTL falls back to 3600. A priority field appears only for MX and is put in front of the mail server name.

The tool applies two rules that commonly trip people up. For CNAME, MX and NS, a target that contains a dot but does not end in one gets a trailing dot added, because in a zone file a name without it is treated as relative and gets the zone name appended. For TXT, the value is wrapped in double quotes, backslashes and quotes are escaped, and text longer than 255 bytes is split into several quoted strings without breaking a multi-byte character.

The value is not validated: it will not check that an A record is a real IPv4 address, and many hosted DNS panels use their own forms rather than raw zone syntax. Review the line before you paste it.

Frequently asked questions

What should the host be?
Use @ for the root domain, or a label such as www or mail. If you leave it empty, @ is used. Some DNS panels expect the full name instead, so check your provider's editor.
Why was a dot added to my CNAME target?
In a zone file a name without a trailing dot is relative to the zone, so mail.example.com would become mail.example.com.example.com. The tool adds the dot to dotted targets for CNAME, MX and NS.
Why is priority only shown for MX?
MX records need a preference number to rank mail servers, with lower numbers tried first. No other supported type has one.
How are long TXT values handled?
They are quoted and escaped, and text over 255 bytes is split into several quoted strings, which is how TXT data is stored. Resolvers join them back together.

More tools