How to Create a Notepad Log File with Automatic Time Stamps
Notepad is the simple, fast text editor that comes free with Windows, and it hides a neat trick: it can keep a Notepad log file that stamps the date and time for you every time you open it. I stumbled on this years ago in a Microsoft support note, still use it for quick work logs, and it works in Windows 11 Notepad today.

Quick answer: Open Notepad, type .LOG (capital letters) on the very first line, press Enter and save the file. Every time you open that file again, Notepad adds the current time and date on a new line at the end, ready for your next entry. To insert the time and date anywhere, press F5.
Table of Contents
How to create a Notepad log file
- Open Notepad (press Windows key, type notepad, press Enter).
- On the first line type .LOG in capital letters, with the dot and nothing else on that line.
- Press Enter to move to the next line.
- Choose File > Save as, give the file a name such as worklog.txt and save it somewhere easy to find, like your Desktop.
- Close the file and open it again. Notepad adds a time stamp such as 10:42 AM 15/10/2026 at the bottom, and the cursor waits on the next line for your note.
- Type your entry, save, and close. Repeat whenever you want to log something.
Remember to type .LOG and not .log. The trick is case sensitive; I found that out when it didn’t work the first time.
Does the .LOG trick work in Windows 11?
Yes. Microsoft’s support note originally described it for Windows 98 and Me, I used it for years on Windows XP, and it still works in the redesigned Windows 11 Notepad. One catch: the new Notepad can restore your previous session and tabs when it starts, and in that mode the file may reopen from memory without a fresh time stamp. Windows Central found the stamp appeared reliably with the startup option set to start a new session. To change it:
- In Notepad, click the gear icon (Settings).
- Under When Notepad starts, choose Start new session and discard unsaved changes.
- Close and reopen your .LOG file to check that a new time stamp appears.
Insert the time and date anywhere with F5
You don’t need a .LOG file to add a time stamp. In any Notepad file, put the cursor where you want it and press F5, or choose Edit > Time/Date. Notepad inserts the current time and date using your Windows regional format, so it shows as day/month/year or month/day/year depending on your settings.
Handy uses for a Notepad log file
- Work log: note what you worked on and when, for timesheets or end-of-day reports.
- Troubleshooting diary: record each fix you try on a PC problem, so you know what changed.
- Health or habit tracker: jot down workouts, medicine times or study sessions.
- Call and meeting notes: every entry gets its time automatically. (For full transcripts of video calls, see our pick of free AI note takers for meetings.)
- Quick journal: a private, offline diary that opens instantly.
Tips and limits
- The time stamp is only added when the file is opened, not when you save it, so open the file fresh for each new entry.
- Keep the file as plain text (.txt). If you save it in another format or with a different encoding, the first line must still read exactly .LOG.
- Pin the file to Start or keep a shortcut on the Desktop so logging takes two seconds.
- If you need a notepad on any device, try our free online notepad, which runs in the browser and saves notes on your device.
Looking for more small but useful Windows utilities? See our list of the best small free software for Windows, or learn how to screen record on Windows 11.
FAQ
Why is my Notepad .LOG file not adding the time?
Check that the first line is exactly .LOG in capitals with nothing else on it, that you closed and reopened the file, and that Notepad is set to start a new session instead of restoring the old one.
Can I change the date format of the time stamp?
Notepad uses your Windows region settings. Change the short date and time formats in Settings > Time & language > Language & region > Regional format.
Does the .LOG trick work in Notepad++ or on a Mac?
No, it is a feature of Windows Notepad only. Other editors need a plugin or a keyboard shortcut to insert the date.
What is the shortcut for time and date in Notepad?
Press F5 to insert the current time and date at the cursor.
Do you keep a log in Notepad? Tell us what you use it for in the comments.
Stuck on a gift? Try our free Gift Idea GeneratorIdeas for anyone by age, job, interests and budget, with Amazon.com and Amazon.in linksFind gifts →Get our free weekly email: new tech guides and tools, no spam.
New and updated tech guides, a free tool worth bookmarking and one useful pick, once a week. No spam, unsubscribe anytime.
One email a week. Unsubscribe anytime. See our privacy policy.






