The quick answer
Every ads.txt line has 4 fields: exchange domain, publisher ID, relationship (DIRECT or RESELLER), and a certificate authority ID. A canonical line reads: greenadexchange.com, 12345, DIRECT, d8b0ca8c5. The generator writes the Google AdSense line from your publisher ID (the fixed TAG ID included), appends your other exchange lines, and renders the file live in your browser. No signup, nothing uploads.
What an ads.txt generator is for
ads.txt exists to stop inventory spoofing: a public, machine-readable list of who is actually allowed to sell your ad space. One malformed line (a missing comma, a lowercase DIRECT, a stray space) and buyers' validators skip the entry entirely. The ads.txt Generator writes the fiddly Google line for you (your publisher ID in the right slot, the fixed TAG ID nobody remembers) and appends your other partners' lines verbatim, entirely in your browser with no upload and no signup.
The rest of this guide walks through how to use the ads.txt generator effectively, how the underlying format actually works, worked examples you can verify by hand, and the edge cases where you should double-check a line before acting on it.
Building an ads.txt file, step by step
The flow is short. Learn it once and the ads.txt Generator takes seconds from then on. The steps below cover the standard path; the tool itself is above this section, so you can follow along live.
Start from the defaults
The form arrives with a placeholder publisher ID and a comment line already in place, so the file renders immediately and you can see its shape before typing anything.
Enter your AdSense publisher ID
Replace pub-0000000000000000 with the real pub-… string from your AdSense account. The generator drops it into the google.com, …, DIRECT, f08c47fec0942fa0 line, Google's fixed TAG ID included.
Add your other exchanges as extra lines
Anything you type in the Extra lines box is appended verbatim (greenadexchange.com, 12345, DIRECT, d8b0ca8c5): one 4-field line per partner beyond AdSense.
Read the generated file
The output pane re-renders on every keystroke: the header comments, the Google line, then your extra lines, in publish order.
Copy and publish
Copy puts the file on your clipboard; publish it at your domain root as /ads.txt (lowercase filename) and make sure it answers with a 200.
Close the tab when you are done
The seller list never leaves the browser: no history, no server copy, no residue.
A minute of practice and the ads.txt Generator flow becomes muscle memory: enter your ID, paste your lines, copy the file. The sections below exist for the moments when something needs a second look.
The ads.txt line format, field by field
Each line is exactly 4 comma-separated fields: the exchange's domain (greenadexchange.com), your publisher ID on that exchange (12345), the relationship in uppercase (DIRECT means you sell through them directly, RESELLER means they sell on someone's behalf), and the Trustworthy Accountability Group (TAG) certificate authority ID, which may be omitted legitimately. Comments start with # and blank lines are ignored; everything else must parse.
A worked ads.txt you can check by hand
Here is the generator's own output for its default input, character for character: the header comments, then `google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0`, then your extra lines. Check it against the IAB spec examples (greenadexchange.com, 12345, DIRECT, d8b0ca8c5): same four fields, comma-plus-space separated, relationship uppercase. The live tool runs the same assembly, so this example matches its output.
Who writes ads.txt files
One ads.txt generator, several professions, surprisingly different jobs. These two profiles cover the most common real-world patterns.
Ad operations managers: adding a new exchange means one new line in a file that must stay perfectly formatted across dozens of partners. Generating the correct line keeps a routine partner change from becoming a week of "why is our inventory unauthorized" tickets.
Site owners and publishers: many publishers touch ads.txt twice, at setup and when a platform demands a fix. A generator that explains the 4 fields while filling them turns both moments into a five-minute job instead of a support call to the ad network.
The role changes the input, never the standard: the same 4-field lines come out either way.
Honest limits and edge cases
Every tool has edge cases; the decent ones announce them first. This section covers where the ads.txt Generator is exact, where it leaves the judgement to you, and the edge cases worth double-checking.
- The generator formats; it cannot verify partners: whether an exchange actually holds your account, or whether your publisher ID is typed right, is knowledge that lives outside the file. Confirm both in the exchange's dashboard before publishing.
- app-ads.txt is a sibling spec: mobile apps use app-ads.txt with the same 4-field lines but a different filename and placement; generate that file separately for app inventory.
The pattern repeats across every line: the format never varies, only the partners feeding it do. ads.txt Generator documents that format so the file stays predictable.
Your seller list never leaves the browser
A seller list is revenue strategy in plain text: which exchanges you work with, at what relationship, says exactly where your money comes from. The generator assembles every line locally in the tab: no partner list, no publisher ID, no draft file ever becomes a network request.
This matters beyond principle: the inputs are your publisher ID and your full partner list, exactly the kind of data that should never cross an unnecessary network boundary. Local processing is not a feature here; it is the architecture.
ads.txt generator versus hand-editing
Before committing to ads.txt Generator, see how it compares: the table below rates it against the common alternatives on speed, privacy, and whether the method is documented.
| Alternative | Where it wins | Where this tool wins |
|---|---|---|
| Google Ad Manager's ads.txt management | Serves and updates the file automatically for managed inventory; no manual publishing at all | Works on any stack (a static site, a hand-managed root) with no Ad Manager account and output you control line by line |
| Search-marketing suite generators | Bundled with site audits and bulk workflows when you already pay for the suite | One free page, no signup: the Google line with its fixed TAG ID rendered in seconds |
| AI chatbots | Explain DIRECT versus RESELLER and draft custom exchange lines in prose | The TAG ID and field order are emitted exactly, never hallucinated, and your seller list never lands in a chat log |
Tips, gotchas and quick fixes
Technique, not trial and error, is what makes ads.txt Generator pay off; five minutes of reading beats an hour of experimenting. Here is the distilled version.
- Start from the default values: the placeholder publisher ID already renders a complete file, so you see the format before typing your real ID.
- Chain tools when a workflow needs more than one step; the related-tools links below cover the neighbors, and the output copies with one click.
When something behaves unexpectedly, the causes are almost always one of these:
- Platforms still say "unauthorized inventory": check propagation. The file must sit at the domain root (https://example.com/ads.txt, lowercase filename) and platforms re-crawl on their own schedule, often 24 hours or more.
- A line keeps failing validation: count the commas. Exactly 4 fields means 3 commas; a trailing comma creates a 5th empty field, and a missing TAG ID is fine but a missing publisher ID is not.
One more thing worth knowing: the contact page reaches the team that builds the ads.txt Generator.
Frequently asked questions
These are the questions people actually search about the ads.txt generator, answered directly. If yours is missing, the contact page takes feature and question requests.
What is the difference between DIRECT and RESELLER?
DIRECT means you have a direct contractual relationship with that exchange: you authorized it yourself. RESELLER means that account acts as an intermediary selling inventory on someone else's behalf. The third field must be one of those two words, in uppercase, or buyers' validators ignore the line.
Is the ads.txt Generator free to use?
Yes, completely free. There is no signup, no email gate and no count of how many times you run it. ads.txt Generator runs entirely in your browser, so each extra use costs this site nothing and costs you nothing either. Generate as many files as the job requires.
Does the ads.txt Generator output follow the IAB format exactly?
Yes, for the Google line: your publisher ID lands in the exact slot the 4-field format defines, and Google's TAG ID is the published constant f08c47fec0942fa0. Extra lines are appended exactly as you type them, so their 4-field correctness is yours to keep.
Does the ads.txt Generator work on mobile?
Yes. The layout reflows to any screen size and the controls work comfortably with touch input. It runs in current mobile and desktop browsers with nothing to install.
Do you store what I enter into the ads.txt Generator?
The processing behind the generator is local JavaScript, so no: your inputs are never sent anywhere. The browser's network inspector confirms it if you want proof rather than prose.
Tools that pair well with ads.txt
These tools share the ads.txt Generator's workflow most often; the internal links exist because people genuinely chain them, not for keyword decoration.
- Robots.txt Generator: the crawler-rules file that lives at the same domain root; publish both in one deploy.
- security.txt Generator: the vulnerability disclosure file, another plaintext policy for the same site.
- UTM Campaign Builder: tag the campaign links your authorized sellers send traffic to, so the buy stays measurable.
Where to start
Start with AdSense: paste your pub-… publisher ID from Account → Settings → Account information, and the generator writes the google.com DIRECT line with the correct TAG ID. Add your other exchanges as extra lines (one 4-field line each), then publish at the domain root as /ads.txt (lowercase, HTTPS-reachable) and check it in a browser before the platforms re-crawl it.
Sources and further reading
- IAB Tech Lab: the ads.txt specification(iabtechlab.com)
- Google Ad Manager Help: create and publish ads.txt(support.google.com)
- Google AdSense Help: add ads.txt to your site(support.google.com)
- Trustworthy Accountability Group: TAG IDs(tagtoday.org)
We cite primary sources (standards bodies, government agencies, official documentation) wherever they exist so you can verify every number on this page yourself.