Telegram & Email Share Link Generator
Enter a URL and message once and get a Telegram share link and a mailto: email link side by side.
About the Telegram & Email Share Link Generator
One form, two real link formats. The Telegram link uses t.me/share/url, the official share endpoint that opens Telegram's chat picker with your URL and text attached. The email link is a plain mailto: URI, so clicking it opens whatever mail client is set as default on the visitor's device with the subject and body already filled in. Line breaks in your message are converted to %0D%0A for the email body, since that is the carriage-return-plus-line-feed sequence mail clients expect inside a mailto: body, while the Telegram text field just needs standard percent-encoding.
The email body normalizes every possible line-ending style before encoding
Depending on the operating system and browser, a textarea's line breaks can come through as a plain line feed, a Windows-style carriage-return-plus-line-feed pair, or, rarely, an old classic-Mac-style carriage return alone. Before building the mailto link, the tool runs the message through text.replace(/\r\n|\r|\n/g, "\r\n"), which catches all three possible variants and rewrites every one of them to the same CRLF sequence. That normalization step happens before encoding specifically so the email body's line breaks display correctly regardless of which operating system or browser generated the original text.
Telegram's text field skips that normalization on purpose
The Telegram share link doesn't apply the same line-ending rewrite — its message text is passed straight through encodeURIComponent() with whatever raw line breaks it already contains. That's because Telegram's chat picker doesn't carry the same strict CRLF expectation the mailto: URI specification places on email clients, so there's no equivalent normalization step needed for that link.
The Subject field is scoped to email only, by design
The label explicitly notes "used only for the mailto link" because Telegram's t.me/share/url endpoint has no subject-line concept at all — it only accepts a URL and a body of text, with no separate title or subject slot the way an email does. Typing something into the Subject field has no effect whatsoever on the generated Telegram link; it's read only when the email link is built.
Where this tool's parameter handling sits compared to its sibling share-link generators
This site's LinkedIn Share Link Generator only ever accepts a URL, with no text parameter at all. Its WhatsApp counterpart accepts just one combined text field that has to carry both the message and the URL together. Telegram's format sits in between those two extremes: it exposes genuinely separate url and text parameters, so this tool can pass your message and link independently without needing to merge them into a single string or drop one of them entirely.
Both links are built from the same shared function, but tracked independently
A single buildLinks() function runs on every keystroke in any of the three fields — URL, message, and subject — and rebuilds both the Telegram and email links together in one pass. Each one is stored in its own separate variable and written to its own result box and Open Link button, so copying or opening one link never accidentally reflects a stale or half-updated version of the other, even though they're generated from the exact same input event.
Opening a link doesn't consume or reset the form
Clicking either "Open Link" button is just a normal anchor click with a live, currently-generated href — nothing about the form is cleared or reset afterward. You can open the Telegram link, come back, tweak your message, and open the email link a moment later with the freshly updated text, since both buttons simply read whatever the current state of the form has already produced at the exact moment you click.
Frequently Asked Questions
Why does my message's formatting look different in the email body versus the Telegram link?
The email body normalizes every line-break style (LF, CRLF, or lone CR) into a consistent CRLF sequence before encoding, since that's what the mailto: standard expects. The Telegram link doesn't apply that same rewrite, since Telegram's share dialog has no equivalent strict requirement.
Why doesn't typing an Email Subject change the Telegram link?
Telegram's share endpoint only accepts a URL and a text parameter — it has no concept of a subject line, so that field is read only when building the email link.
Does clicking "Open Link" on the email button actually send an email?
No. It only opens whatever email client is set as your device's default, with the subject and body pre-filled. You still have to review it and click send yourself.
What happens if I click Open Link without a default mail client configured?
Behavior depends on your device and browser — some will prompt you to choose or set up a mail app, while others may do nothing visible if no handler for mailto: links is configured.
Can I pass a URL and message to Telegram separately, or do they get merged?
They stay separate. Telegram's t.me/share/url format accepts distinct url and text parameters, unlike some other platforms' share links that only expose a single combined text field.
Is anything I type sent to a server before the link is generated?
No. Both links are assembled entirely in your browser using plain JavaScript string building — nothing is transmitted anywhere until you actually click Open Link or paste the copied link elsewhere.