Opens in your browser. Nothing is uploaded.
Open an .md file online
Got an .md file from ChatGPT or Claude? Drop it here to read it as a clean page with its headings, lists and tables. Then save it as a Word document in one click.
Save a chat from ChatGPT or Claude
One bookmark turns the chat you have open into a clean page here, with its headings, lists and tables, ready to save as Word or as an .md file. The chat goes from that tab to this one inside your browser. It is never sent to Ritemark.
- Drag this button to your bookmarks bar: Save chat to Ritemark
- Open a chat in chatgpt.com or claude.ai.
- Click the bookmark. The chat opens here in a new tab.
If the bookmarks bar is hidden, show it first (Ctrl+Shift+B in Chrome and Edge, Shift+Cmd+B on a Mac). Clicking the button on this page does nothing, it has to be dragged. Some browsers or work computers block bookmarks that run code.
See exactly what the bookmark does
This is its whole code. It reads only the page you click it on and sends nothing to a server.
(function () {
/* Where each site keeps its messages. If a site changes its page, change the lists here. */
var SITES = [
{
host: /(^|\.)(chatgpt\.com|chat\.openai\.com)$/,
bot: 'ChatGPT',
you: ['[data-message-author-role="user"]'],
reply: ['[data-message-author-role="assistant"]']
},
{
host: /(^|\.)claude\.ai$/,
bot: 'Claude',
you: ['[data-testid="user-message"]'],
reply: ['.font-claude-response', '[data-is-streaming]']
}
];
var TICK = String.fromCharCode(96);
var site = SITES.filter(function (s) { return s.host.test(location.hostname); })[0];
var found = [];
if (site) {
[['You', site.you], ['bot', site.reply]].forEach(function (kind) {
document.querySelectorAll(kind[1].join(',')).forEach(function (el) {
found.push({ el: el, who: kind[0] === 'You' ? 'You' : site.bot });
});
});
/* Keep the innermost element when one message sits inside another. */
found = found.filter(function (a) {
return !found.some(function (b) { return b !== a && a.el.contains(b.el); });
});
found.sort(function (a, b) {
return a.el.compareDocumentPosition(b.el) & 4 ? -1 : 1;
});
}
if (!found.length) {
alert('Ritemark could not find the chat on this page. Open a chat in ChatGPT or Claude and try again.');
return;
}
/* HTML to Markdown: headings, paragraphs, lists, bold, italic, code, links, quotes, tables. */
function kids(node) {
var out = '';
for (var c = node.firstChild; c; c = c.nextSibling) out += md(c);
return out;
}
function cell(c) {
return kids(c).replace(/\s+/g, ' ').replace(/\|/g, '\\|').trim();
}
function md(n) {
if (n.nodeType === 3) return n.nodeValue.replace(/\s+/g, ' ');
if (n.nodeType !== 1) return '';
var t = n.tagName.toLowerCase();
if (/^(script|style|button|svg|nav|textarea)$/.test(t)) return '';
if (n.classList.contains('katex-html')) return '';
if (n.classList.contains('katex')) {
var tex = n.querySelector('annotation');
return tex ? '$' + tex.textContent + '$' : '';
}
if (/^h[1-6]$/.test(t)) {
var level = Math.min(Number(t.charAt(1)) + 2, 6);
return '\n\n' + '######'.slice(0, level) + ' ' + kids(n).trim() + '\n\n';
}
if (t === 'p') return '\n\n' + kids(n).trim() + '\n\n';
if (t === 'br') return ' \n';
if (t === 'hr') return '\n\n---\n\n';
if (t === 'strong' || t === 'b') return kids(n).trim() ? '**' + kids(n).trim() + '**' : '';
if (t === 'em' || t === 'i') return kids(n).trim() ? '*' + kids(n).trim() + '*' : '';
if (t === 'code') return TICK + n.textContent + TICK;
if (t === 'pre') {
var code = n.querySelector('code') || n;
var lang = (/language-([\w+#-]+)/.exec(code.className) || [])[1] || '';
var fence = TICK + TICK + TICK;
return '\n\n' + fence + lang + '\n' + code.textContent.replace(/\n$/, '') + '\n' + fence + '\n\n';
}
if (t === 'a') {
var href = n.getAttribute('href');
var text = kids(n).trim();
if (!href || !text || /^javascript:/i.test(href)) return text;
return '[' + text + '](' + n.href + ')';
}
if (t === 'ul' || t === 'ol') {
var items = [];
Array.prototype.forEach.call(n.children, function (li) {
if (li.tagName.toLowerCase() !== 'li') return;
var mark = t === 'ol' ? items.length + 1 + '. ' : '- ';
var body = kids(li).trim().replace(/\n{2,}/g, '\n');
items.push(mark + body.replace(/\n/g, '\n' + ' '.slice(0, mark.length)));
});
return '\n\n' + items.join('\n') + '\n\n';
}
if (t === 'blockquote') {
return '\n\n' + kids(n).trim().replace(/^/gm, '> ') + '\n\n';
}
if (t === 'table') {
var rows = Array.prototype.map.call(n.querySelectorAll('tr'), function (tr) {
return Array.prototype.map.call(tr.children, cell);
});
if (!rows.length) return '';
var width = Math.max.apply(null, rows.map(function (r) { return r.length; }));
var line = function (r) {
while (r.length < width) r.push('');
return '| ' + r.join(' | ') + ' |';
};
var rule = '|' + Array(width + 1).join(' --- |');
return '\n\n' + [line(rows[0]), rule].concat(rows.slice(1).map(line)).join('\n') + '\n\n';
}
if (t === 'div' || t === 'section' || t === 'li') return '\n' + kids(n) + '\n';
return kids(n);
}
var parts = [];
var title = document.title.replace(/\s*[|\-–—]\s*(ChatGPT|Claude)\s*$/i, '').trim();
if (title && !/^(ChatGPT|Claude)$/i.test(title)) parts.push('# ' + title);
found.forEach(function (m) {
var body = m.who === 'You' ? m.el.innerText.trim() : md(m.el).replace(/\n{3,}/g, '\n\n').trim();
if (body) parts.push('## ' + m.who + '\n\n' + body);
});
var markdown = parts.join('\n\n') + '\n';
/* Markdown to text safe for an address: UTF-8 bytes, then base64 with - and _ . */
var bytes = new TextEncoder().encode(markdown);
if (bytes.length > 1500000) {
alert('This chat is too long for Ritemark to open in the browser (over 1.5 MB). Save a shorter part of it.');
return;
}
var binary = '';
for (var i = 0; i < bytes.length; i += 8192) {
binary += String.fromCharCode.apply(null, bytes.subarray(i, i + 8192));
}
var code64 = btoa(binary).replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, '');
/* After the # the text stays in the browser: it is never sent to a server. */
var url = 'https://ritemark.app/open/?utm_source=open-tool&utm_medium=bookmarklet&utm_campaign=dingo-e12#chat=' + code64;
window.open(url, '_blank', 'noopener,noreferrer');
})();Edit your .md files as pages, and the AI writes the next draft with you
Ritemark is a writing app for Mac and Windows. Files like this one open as normal pages, and ChatGPT or Claude work with you in your documents, starting from what you have already written instead of an empty chat.
Ritemark is free and open source.
Questions about .md files
What is an .md file?
It is a Markdown file: plain text with a few marks for headings, lists, bold words and tables. ChatGPT and Claude write in Markdown, so when you ask them for a file, you often get an .md file. In a plain text editor you see the marks. On this page you see the document.
Is my file uploaded?
No. Your browser reads the file and draws it on this page, and the Word file is made in your browser too. The file, its name and its text are never sent to Ritemark or anyone else. We count that a file was opened, never what it is called or what it says. You can check it yourself: once this page has loaded, turn off Wi-Fi and open a file.
Can I open a file from a link?
Yes, if the link is public and starts with https, such as a .md file on GitHub or a gist. Choose "Open from a link" and paste it. Your browser fetches the file straight from where it lives, never through Ritemark, and the page shows whose file it is. Then "Copy a readable link" gives you an address you can send to someone who cannot read raw Markdown. We never record which file the link points to.
How does saving a chat work, and is my chat sent anywhere?
The bookmark runs on the ChatGPT or Claude tab you click it on and reads only that page. It turns the chat into Markdown and opens this page with the text after a # in the address. Browsers never send that part to a server, so the chat stays on your computer. This page reads it, then clears it from the address. Its whole code is shown above. If ChatGPT or Claude change their pages and the bookmark cannot find the chat, it tells you instead of saving something wrong. Some browsers or work computers block bookmarks that run code.
Can I edit the file here?
This page is for reading the file and saving it as Word or PDF. To edit .md files as normal pages, with the AI working on them beside you, use Ritemark on your Mac or Windows computer.
How do I open .md files on my computer?
Mac and Windows can open them in a few ways, from Quick Look to a text editor. Our guide shows each one, tested: How to open an .md file on Mac and Windows.