Clever Quest Lab Tools

Online Notepad

Write notes in a plain, distraction-free editor that saves every change in your browser as you type. Keep as many notes as you like, search them, preview simple formatting, see a live word count and download any note as a TXT, Markdown or HTML file. A backup puts all notes in one file that you can restore on another device.

Your notes

Saved

Notes stay only in this browser on this device. Nothing is uploaded. Back up all notes to keep a copy.

    Words: 0 Characters: 0 Reading time: 0 min

    Export this note: Import:
    All notes:

    Ctrl+S saves now (Cmd on Mac) · Ctrl+B bold · Ctrl+I italic

    Runs on your device. Nothing you type or record is uploaded. Keeps working without a connection while the page is open. Works with touch. Saves all your notes on this device as you type, until you delete them or clear the site data.

    Added · Updated : back up and restore all notes, reading time at 238 words per minute

    How to use the online notepad

    1. Click in the big text area and start typing. There is no save button to press: the status badge changes to "Saving…" and then to "Saved" about half a second after you stop.
    2. Give the note a title in the field above the text. The title appears in the list on the left and is used as the file name when you export.
    3. Press + New note to start another note. Click any note in the list to switch to it. The search box filters the list by title and text.
    4. Use Edit and Preview to switch between writing and reading the formatted result.
    5. To remove a note press Delete note. A bar appears with an Undo button, so a slip of the finger is not final.
    6. Under the text, use TXT, Markdown or HTML to download the current note, or Open .txt / .md file to bring a file in as a new note.
    7. To keep or move every note, press Back up all notes. On the other device press Restore from backup, choose the file and pick Add to my notes or Replace my notes. Both can be undone straight after.

    How autosave works

    The notepad keeps all of your notes in one record in your browser's localStorage, a small storage area that every website gets for itself. Each change is written there shortly after you stop typing, and once more when you switch notes, press Ctrl+S or leave the page. When you come back later in the same browser, the notes are read from that record and appear exactly as you left them.

    This has two consequences that are worth knowing. First, nothing you write is uploaded, so the notes stay on this device, but there is also no copy anywhere else. Second, the notes belong to one browser profile on one device. A different browser, a different computer or a phone will show an empty notepad. Browsers usually allow about 5 MB of localStorage per origin, that is per website address. That is several hundred thousand words of plain text, but if the limit is ever reached the page tells you that the latest changes were not saved.

    If the browser refuses to store data at all, for example in some private windows or when site data is blocked, the badge shows "Not saved" and a warning explains what happened.

    Formatting with Markdown

    The editor is plain text, so there is no hidden formatting and nothing strange happens when you copy the text elsewhere. To add emphasis, headings or lists you type a few simple marks, called Markdown, and the Preview button shows the result. The buttons above the text (B, I, H, List, Link) insert the marks for you, and Ctrl+B and Ctrl+I work inside the text area.

    You typePreview shows
    **bold**bold text
    *italic*italic text
    ## Headinga heading (one to six # signs set the level)
    - itema bulleted list
    1. itema numbered list
    - [ ] taska list item with an empty box (use [x] for a ticked box)
    > quotean indented quotation
    `code`text in a code font
    [text](https://example.com)a link that opens in a new tab
    ---a horizontal line

    Line breaks are kept as you type them, and a blank line starts a new paragraph. Nested lists and tables are not supported. The preview never runs scripts: any HTML you type is shown as plain text, and only links starting with http://, https:// or mailto: become clickable.

    Word count, character count and reading time

    Below the text area the page counts three things. Words are groups of characters separated by spaces or line breaks, so "well-known" counts as one word and "e-mail" as one. Characters counts every character including spaces and line breaks. Reading time divides the word count by 238 words per minute, the average for silent reading of non-fiction in Marc Brysbaert's 2019 review of reading studies, and rounds up to a whole minute, so any note with at least one word shows at least "~1 min". The Word Counter starts at the same speed, lets you change it and shows minutes and seconds instead of rounding up.

    Examples

    Example 1: counting. Type Buy milk, eggs and bread. The page shows 5 words and 25 characters (19 letters, 2 punctuation marks and 4 spaces) and a reading time of ~1 min.

    Example 2: reading time. A note of 476 words divided by 238 words per minute is exactly 2 minutes, so the page shows ~2 min. A note of 500 words gives 2.10 minutes, which is rounded up to ~3 min.

    Example 3: formatting. Type ## Shopping on one line and - milk and - **eggs** on the next two lines. In Preview you see a heading "Shopping" followed by a bulleted list with "milk" and a bold "eggs".

    Example 4: exporting. A note titled "Meeting notes 12 Oct" is downloaded as meeting-notes-12-oct.txt, meeting-notes-12-oct.md or meeting-notes-12-oct.html. The TXT and Markdown files contain the text exactly as typed; the HTML file contains the title as a heading and the formatted note below it.

    Export, import and backups

    Because the notes live only in your browser, the safest habit is to export the notes that matter. TXT opens in every editor on every system. Markdown keeps the formatting marks and works in many note and documentation tools. HTML is a ready-to-read web page with a light background.

    To bring text in, press Open .txt / .md file and choose a file. It becomes a new note named after the file. Files must be plain text and no larger than 1 MB; other file types are not converted.

    Back up all notes saves every note with its title in one JSON file named after the day, for example notepad-backup-2026-10-25.json. Restore from backup reads such a file on any device and asks what to do. Add to my notes puts the notes from the backup at the top of the list and skips any note whose title and text are already there. Replace my notes keeps only the notes from the backup. A file that is not a backup from this notepad is refused with a message and nothing changes. The backup is plain text that anyone with the file can read, so keep it somewhere private.

    Keeping your notes safe

    Frequently asked questions

    Does it save automatically?

    Yes. Every change is stored in your browser a moment after you stop typing. Ctrl+S saves immediately and confirms it below the notes, but it does not download a file; use the export buttons for that.

    How many notes can I keep?

    There is no fixed number. The limit is the storage space your browser gives the site, usually about 5 MB in total, which is enough for a very large number of ordinary text notes.

    Why did my notes disappear?

    The usual reasons are cleared site data, a private window, a different browser or profile, or a different device. The notes are not stored anywhere else, which is why a backup of all notes is worth keeping.

    Can I undo a deleted note?

    Yes, with the Undo button that appears right after deleting. It stays for a while, but once you dismiss it or delete another note, or when you close the page, the earlier note is gone for good. Inside the text area, Ctrl+Z undoes typing as usual.

    Sources

    \n\n'; download(base + '.html', 'text/html;charset=utf-8', doc); } msg('Exported ' + base + '.' + kind + '. Check your downloads folder.'); } function importFile(file) { if (!file) return; if (file.size > MAX_IMPORT) { msg('That file is larger than 1 MB, so it was not imported.'); return; } function done(txt) { if (txt.indexOf('\u0000') !== -1) { msg('That file does not look like plain text, so it was not imported.'); return; } var name = file.name.replace(/\.(txt|md|markdown)$/i, ''); addNote(name, txt.replace(/\r\n?/g, '\n')); msg('Imported “' + file.name + '” as a new note.'); } if (file.text) file.text().then(done, function () { msg('The file could not be read.'); }); else { var fr = new FileReader(); fr.onload = function () { done(String(fr.result)); }; fr.onerror = function () { msg('The file could not be read.'); }; fr.readAsText(file); } } /* ---------- backup and restore of all notes ---------- */ var pending = null; // parsed backup waiting for "Add" or "Replace" var restoreUndo = null; // notes as they were before the last restore function plural(n, one, many) { return n + ' ' + (n === 1 ? one : many); } function pad2(n) { return (n < 10 ? '0' : '') + n; } function copyNotes(list) { return list.map(function (n) { return { id: n.id, title: n.title, text: n.text, t: n.t }; }); } function backupAll() { flush(); var d = new Date(); var name = 'notepad-backup-' + d.getFullYear() + '-' + pad2(d.getMonth() + 1) + '-' + pad2(d.getDate()) + '.json'; var data = { format: BACKUP_FORMAT, v: 1, saved: d.toISOString(), cur: cur, notes: copyNotes(notes) }; download(name, 'application/json;charset=utf-8', JSON.stringify(data, null, 2) + '\n'); el.bmsg.textContent = 'Backed up ' + plural(notes.length, 'note', 'notes') + ' to ' + name + '. Check your downloads folder.'; } // Reads a backup file; anything else gives an error and changes nothing. function parseBackup(txt) { var d; try { d = JSON.parse(String(txt).replace(/^\uFEFF/, '')); } catch (e) { return { error: 'That file is not a notepad backup (it is not valid JSON), so nothing was changed.' }; } if (!d || typeof d !== 'object' || !Array.isArray(d.notes) || (d.format !== BACKUP_FORMAT && d.v !== 1)) { return { error: 'That file is not a backup from this notepad, so nothing was changed.' }; } var seen = {}, list = []; d.notes.forEach(function (n) { if (!n || typeof n !== 'object' || (typeof n.text !== 'string' && typeof n.title !== 'string')) return; var id = typeof n.id === 'string' && n.id ? n.id : uid(); while (seen[id]) id = uid(); seen[id] = true; list.push({ id: id, title: String(n.title || ''), text: String(n.text || '').replace(/\r\n?/g, '\n'), t: +n.t || 0 }); }); if (!list.length) return { error: 'That backup contains no notes, so nothing was changed.' }; var when = ''; var dt = typeof d.saved === 'string' ? new Date(d.saved) : null; if (dt && !isNaN(dt.getTime())) { try { when = dt.toLocaleDateString('en-GB', { day: 'numeric', month: 'short', year: 'numeric' }); } catch (e2) { when = ''; } } return { notes: list, cur: typeof d.cur === 'string' ? d.cur : null, when: when }; } function showRestore(choosing, text) { el.restoreText.textContent = text; el.merge.hidden = el.replace.hidden = el.rcancel.hidden = !choosing; el.rundo.hidden = el.rclose.hidden = choosing; el.restore.hidden = false; } function closeRestore() { el.restore.hidden = true; pending = null; restoreUndo = null; } function readBackup(file) { if (!file) return; closeRestore(); el.bmsg.textContent = ''; if (file.size > MAX_BACKUP) { el.bmsg.textContent = 'That file is larger than 10 MB, so it is not a notepad backup. Nothing was changed.'; return; } function done(txt) { var b = parseBackup(txt); if (b.error) { el.bmsg.textContent = b.error; return; } flush(); pending = b; showRestore(true, '“' + file.name + '” holds ' + plural(b.notes.length, 'note', 'notes') + (b.when ? ', backed up on ' + b.when : '') + '. You have ' + plural(notes.length, 'note', 'notes') + ' here. Add the backup to ' + (notes.length === 1 ? 'it' : 'them') + ', or replace ' + (notes.length === 1 ? 'it' : 'them') + ' with the backup?'); el.merge.focus(); } function fail() { el.bmsg.textContent = 'The file could not be read, so nothing was changed.'; } if (file.text) file.text().then(done, fail); else { var fr = new FileReader(); fr.onload = function () { done(String(fr.result)); }; fr.onerror = fail; fr.readAsText(file); } } function finishRestore(text) { var ok = save(); showNote(); showRestore(false, text + (ok ? '' : ' They are not saved in this browser yet; see the warning above.')); el.rundo.focus(); } function mergeBackup() { if (!pending) return; var b = pending; pending = null; var ids = {}, sigs = {}, added = [], skipped = 0; notes.forEach(function (n) { ids[n.id] = true; sigs[n.title + '\u0000' + n.text] = true; }); b.notes.forEach(function (n) { var sig = n.title + '\u0000' + n.text; if (sigs[sig]) { skipped++; return; } var id = n.id; while (ids[id]) id = uid(); ids[id] = true; sigs[sig] = true; added.push({ id: id, title: n.title, text: n.text, t: n.t }); }); if (!added.length) { showRestore(false, 'All ' + plural(b.notes.length, 'note', 'notes') + ' in the backup are already here, so nothing was added.'); el.rundo.hidden = true; el.rclose.focus(); return; } restoreUndo = { notes: copyNotes(notes), cur: cur }; notes = added.concat(notes); query = ''; el.search.value = ''; finishRestore('Added ' + plural(added.length, 'note', 'notes') + ' from the backup to the top of the list' + (skipped ? '; ' + skipped + ' already here ' + (skipped === 1 ? 'was' : 'were') + ' skipped.' : '.')); } function replaceWithBackup() { if (!pending) return; var b = pending; pending = null; restoreUndo = { notes: copyNotes(notes), cur: cur }; var before = notes.length; notes = copyNotes(b.notes); cur = b.cur && find(b.cur) ? b.cur : notes[0].id; query = ''; el.search.value = ''; finishRestore('Your ' + plural(before, 'note was', 'notes were') + ' replaced by the ' + plural(b.notes.length, 'note', 'notes') + ' from the backup.'); } function undoRestore() { if (!restoreUndo) return; var u = restoreUndo; restoreUndo = null; notes = u.notes; cur = find(u.cur) ? u.cur : notes[0].id; closeRestore(); save(); showNote(); el.bmsg.textContent = 'Undone. Your notes are back as they were before the restore.'; el.restoreBtn.focus(); } /* ---------- formatting helpers (plain-text Markdown syntax) ---------- */ function insertAt(start, end, str, selStart, selEnd) { el.text.focus(); el.text.setSelectionRange(start, end); var ok = false; try { ok = document.execCommand('insertText', false, str); } catch (e) { ok = false; } if (!ok) { el.text.setRangeText(str, start, end, 'end'); el.text.dispatchEvent(new Event('input', { bubbles: true })); } el.text.setSelectionRange(selStart, selEnd); } function wrap(mark) { var v = el.text.value, s = el.text.selectionStart, e = el.text.selectionEnd; var sel = v.slice(s, e), L = mark.length; if (sel && sel.length >= 2 * L && sel.slice(0, L) === mark && sel.slice(-L) === mark) { var inner = sel.slice(L, sel.length - L); insertAt(s, e, inner, s, s + inner.length); } else if (!sel && v.slice(s - L, s) === mark && v.slice(s, s + L) === mark) { insertAt(s - L, s + L, '', s - L, s - L); } else { insertAt(s, e, mark + sel + mark, s + L, s + L + sel.length); } } function lineRange() { var v = el.text.value, s = el.text.selectionStart, e = el.text.selectionEnd; var a = v.lastIndexOf('\n', s - 1) + 1; var b = v.indexOf('\n', e > s && v.charAt(e - 1) === '\n' ? e - 1 : e); if (b === -1) b = v.length; return [a, b]; } function heading() { var r = lineRange(), block = el.text.value.slice(r[0], r[1]); var out = block.split('\n').map(function (l) { return /^##\s/.test(l) ? l.replace(/^##\s/, '') : '## ' + l.replace(/^#{1,6}\s/, ''); }).join('\n'); insertAt(r[0], r[1], out, r[0], r[0] + out.length); } function bullets() { var r = lineRange(), block = el.text.value.slice(r[0], r[1]); var ls = block.split('\n'); var all = ls.every(function (l) { return /^\s*[-*+]\s/.test(l); }); var out = ls.map(function (l) { return all ? l.replace(/^(\s*)[-*+]\s/, '$1') : '- ' + l; }).join('\n'); insertAt(r[0], r[1], out, r[0], r[0] + out.length); } function link() { var s = el.text.selectionStart, e = el.text.selectionEnd, sel = el.text.value.slice(s, e) || 'link text'; var u = s + sel.length + 3; insertAt(s, e, '[' + sel + '](https://)', u, u + 8); } /* ---------- events ---------- */ el.text.addEventListener('input', function () { var n = find(cur); n.text = el.text.value; renderStats(); changed(); }); el.title.addEventListener('input', function () { var n = find(cur); n.title = el.title.value; changed(); renderList(); }); el.search.addEventListener('input', function () { query = el.search.value.trim(); renderList(); }); el.list.addEventListener('click', function (e) { var b = e.target.closest ? e.target.closest('.np-item') : null; if (b) select(b.getAttribute('data-id'), true); }); el.nw.addEventListener('click', function () { addNote('', ''); el.title.focus(); msg('New note created. Give it a title or start typing.'); }); el.del.addEventListener('click', deleteNote); el.undoBtn.addEventListener('click', undoDelete); el.undoClose.addEventListener('click', function () { hideUndo(); el.nw.focus(); }); el.modeEdit.addEventListener('click', function () { mode = 'edit'; applyMode(); save(); el.text.focus(); }); el.modePrev.addEventListener('click', function () { mode = 'preview'; applyMode(); save(); }); $('np-b').addEventListener('click', function () { wrap('**'); }); $('np-i').addEventListener('click', function () { wrap('*'); }); $('np-h').addEventListener('click', heading); $('np-ul').addEventListener('click', bullets); $('np-a').addEventListener('click', link); $('np-ex-txt').addEventListener('click', function () { exportNote('txt'); }); $('np-ex-md').addEventListener('click', function () { exportNote('md'); }); $('np-ex-html').addEventListener('click', function () { exportNote('html'); }); el.imp.addEventListener('click', function () { el.file.click(); }); el.file.addEventListener('change', function () { var f = el.file.files && el.file.files[0]; importFile(f); el.file.value = ''; }); el.backup.addEventListener('click', backupAll); el.restoreBtn.addEventListener('click', function () { el.bfile.click(); }); el.bfile.addEventListener('change', function () { var f = el.bfile.files && el.bfile.files[0]; readBackup(f); el.bfile.value = ''; }); el.merge.addEventListener('click', mergeBackup); el.replace.addEventListener('click', replaceWithBackup); el.rcancel.addEventListener('click', function () { closeRestore(); el.bmsg.textContent = 'Restore cancelled. Nothing was changed.'; el.restoreBtn.focus(); }); el.rundo.addEventListener('click', undoRestore); el.rclose.addEventListener('click', function () { closeRestore(); el.restoreBtn.focus(); }); document.addEventListener('keydown', function (e) { if (!(e.ctrlKey || e.metaKey) || e.altKey) return; var k = e.key.toLowerCase(); if (k === 's') { e.preventDefault(); if (save()) { renderList(); msg('Saved in this browser. Use the export buttons to download a copy.'); } else msg('Could not save in this browser. Export the note to keep it.'); } else if ((k === 'b' || k === 'i') && document.activeElement === el.text) { e.preventDefault(); wrap(k === 'b' ? '**' : '*'); } }); window.addEventListener('pagehide', flush); document.addEventListener('visibilitychange', function () { if (document.hidden) flush(); }); window.addEventListener('storage', function (e) { if (e.key !== KEY || dirty || !e.newValue) return; try { var d = JSON.parse(e.newValue); if (!d || !Array.isArray(d.notes) || !d.notes.length) return; notes = clean(d.notes); if (!notes.length) return; if (!find(cur)) cur = notes[0].id; showNote(); msg('Notes were updated from another tab.'); } catch (err) { /* ignore */ } }); load(); showNote(); if (storageOk) save(); })();