Everyone needs a place to express thoughts, save daily experiences, or note down emotions. But buying fancy diary apps or worrying about privacy isn’t necessary, because you can easily create your own personal diary with password protection using Notepad.
It’s quick, simple, and totally free.
Let’s see how you can do it step by step!
Why Make a Diary in Notepad?
Notepad is one of the most underrated apps on Windows. It looks simple, but it’s actually powerful when you combine it with basic scripting.
Here’s why you should use Notepad for your personal diary:
✅ No need to install any software
✅ Super lightweight and opens instantly
✅ 100% offline and private
✅ You can add password protection manually
✅ Fully customizable — your diary, your style
What You’ll Learn
By the end of this guide, you’ll be able to:
- Create a personal diary in Notepad
- Lock it with a password (for privacy)
- Automatically show date and time when you open it
- Save your notes securely
Step 1: Open Notepad
Click Start → Notepad, or press Windows + R, type notepad
, and hit Enter.
You’ll see a blank white screen — your digital paper.
Step 2: Add the Diary Script
Copy and paste the following code into your Notepad:
@echo off
title Personal Diary - Secure
color 0A
:LOGIN
cls
echo ================================
echo Welcome to Your Diary
echo ================================
set /p pass=Enter Password:
if NOT %pass%==12345 goto DENIED
goto DIARY
:DENIED
echo Wrong Password! Try again.
pause
goto LOGIN
:DIARY
cls
echo ================================
echo My Personal Diary
echo ================================
echo Date: %date%
echo Time: %time%
echo.
echo Type your thoughts below:
echo --------------------------------
set /p entry=>> diary.txt
echo %date% %time% - %entry%>> diary.txt
echo.
echo Your entry has been saved!
pause
exit
Step 3: Save the File
- Click File → Save As
- File name:
MyDiary.bat
- Save as type: All Files
- Encoding: ANSI or UTF-8
- Click Save
Now your diary program is ready!
Step 4: Run Your Diary
Double-click the file MyDiary.bat
.
You’ll see a screen like this:
===============================
Welcome to Your Diary
===============================
Enter Password:
Type your password (in the code above, it’s 12345
).
If it’s correct, the diary opens.
If it’s wrong, it says “Wrong Password! Try again.”
Step 5: Write in Your Diary
Once logged in, the program will show:
Date: 10/17/2025
Time: 16:35:12.45
Type your thoughts below:
Type your daily note and press Enter.
✅ The entry automatically saves into a file called diary.txt
✅ Each line includes date and time for easy tracking
Example inside diary.txt
:
10/17/2025 16:35:12.45 - Had a productive day learning batch scripting!
Step 6: Change Your Password
In the code above, find this line:
if NOT %pass%==12345 goto DENIED
Simply replace 12345
with your own secret password.
Example:
if NOT %pass%==MySecret123 goto DENIED
💡 Tip: Choose a unique password with letters and numbers.
How the Script Works
Let’s understand each part of the code:
Code Line | Function |
---|---|
@echo off | Hides unnecessary command lines |
title Personal Diary | Sets the window title |
color 0A | Gives green text on black background |
:LOGIN | A label for the login section |
set /p pass= | Takes password input |
if NOT %pass%==12345 goto DENIED | Checks password |
set /p entry=>> diary.txt | Saves your entry into a text file |
echo %date% %time% - %entry%>> diary.txt | Adds date/time automatically |
This means every time you open your diary, it’s like a mini app with authentication!
Step 7: Make It More Secure (Optional)
You can make your diary more private with these tricks:
1. Hide the File
Right-click MyDiary.bat
→ Properties → Hidden.
Then open File Explorer → View → Hide hidden items (uncheck it).
Now no one will see your diary unless they know how to unhide files.
2. Change Extension
Rename your file from MyDiary.bat
to something like SystemConfig.bat
.
That way, it looks like a system file and won’t draw attention.
3. Store Diary in a Different Folder
Move your diary.txt
to another folder and set a path in code:
set /p entry=>> "C:\Users\YourName\Documents\Secret\diary.txt"
Bonus: Auto-Open Diary with Current Date
You can make each day have its own diary file automatically.
Replace this line:
set /p entry=>> diary.txt
With this:
set /p entry=>> "%date%.txt"
Now, every time you open it, it will save that day’s entry in a file like:
10-17-2025.txt
Example Output
When you run your diary and enter the correct password, you’ll see:
===============================
My Personal Diary
===============================
Date: 10/17/2025
Time: 18:03:00
Type your thoughts below:
--------------------------------
You type your note (like “Had a great coffee break”), press Enter, and it saves automatically.
Optional Upgrade: Add a “View Entries” Feature
You can extend the same script to view old diary entries:
Add this section after the :DIARY
part:
:VIEW
cls
type diary.txt
pause
goto DIARY
And before login, ask if the user wants to view or write:
echo [1] Write a new entry
echo [2] View past entries
set /p choice=Enter choice:
if %choice%==1 goto DIARY
if %choice%==2 goto VIEW
This small upgrade makes it a mini diary app with two options — write or view.
Real-Life Uses
You can use your Notepad diary for:
- 🧘 Journaling your thoughts and goals
- 📚 Study logs or daily progress tracker
- 💼 Work notes (keep them personal)
- 💖 Emotional expression or gratitude journal
- 🧩 Secret writing practice
Since it’s stored locally, no one can access it online.
Important Tips
Issue | Fix |
---|---|
“Access Denied” while saving | Run Notepad as Administrator |
Password not working | Remove spaces before/after the password |
Diary not saving | Ensure file path is correct |
Someone found your password | Change it in the script |
Final Thoughts
A personal diary doesn’t need to be fancy.
All it needs is a safe place where you can write freely — and Notepad gives you that freedom.
By adding a few lines of code, you’ve turned a simple text editor into your own private diary app, complete with password protection and automatic timestamps.
The best part? It’s fully offline and 100% under your control.
Start today — open Notepad and create your first entry.
Small steps like these can help you build the habit of self-reflection and mindfulness every day.