When I paste this into Notepad on Windows 10:

"first_name"=>"M", "surname"=>"C", "country"=>"Australia"

and then try to find the string "name" with Ctrl+F, it comes up blank:

Notepad find

Is Notepad's Find function completely useless or am I missing something?

  • 4
    @Malandy +1 to Wordpad for being better than Notepad. If by "base Windows" you mean it is installed automatically, then yes, it comes with base Windows. – MindS1 Sep 19 at 13:14
  • 25
    @Malandy as far as built-in Windows utilities go, Wordpad is the best you can get. The best alternatives are Notepad++ for general use, Sublime Text if you're a programmer, or VIM if you're a baller power user. – MindS1 Sep 19 at 13:19
  • 3
    I think if you open up a file that has null characters between each byte of ASCII (e.g. T\x00E\x00X\x00T\x00, which might happen if a UTF-16 file isn't detected as such), it can also cause strange things to happen, where you'll just see TEXT as the nulls get hidden, but never find TEXT in it. That behavior may have changed in newer Windows versions though. – Nick T Sep 19 at 16:00
  • 5
    The real answer is to use Notepad++ instead. – Pikamander2 Sep 20 at 8:38
  • 2
    @Pikamander2 The real real answer is to use Vim instead. ;) – Sparhawk Sep 22 at 7:52
up vote 134 down vote accepted

The Find function starts where you placed your cursor. Since you pasted into Notepad, the cursor is likely at the end of the document.

You can either

  1. move the cursor to the beginning of the document
  2. switch the Find direction from Down to Up
  • 40
    Hint: To move the caret to the start of the file, press Ctrl+Home. (Also, a bit of nitpicking: in Windows, you typically use "cursor" for the mouse pointer thing and "caret" for the text input thing.) – Andreas Rejbrand Sep 19 at 6:42
  • 22
    @AndreasRejbrand only you use that probably, I've never heard anyone actually say caret... or maybe we're both showing our age! – LocustHorde Sep 19 at 7:59
  • 27
    Caret is correct, but it's a bit like talking about Kibibytes. It causes more confusion than benefit in most cases. – allo Sep 19 at 10:31
  • 7
    @AndreasRejbrand Microsoft use the terms cursor and pointer for text cursor and mouse cursor, respectively. "Caret" is only used to describe the text cursor in Windows when talking about "caret browsing" (a term introduced by Firefox). Otherwise it's the ^ symbol/diacritic. – Aaron F Sep 19 at 15:38
  • 11
    Text cursor is referenced almost exclusively as "caret" in Windows API documentation. The SetCursorPos function moves the mouse pointer (cursor) to given (screen) position. The SetCaretPos places the text cursor at given position relative to window's client area. – Daniel Sęk Sep 19 at 16:52

Notepad doesn't support wrap-around search. If you select search direction as Down then it only searches from the cursor onward. Similarly Up will only search backward. The workaround is already mentioned in Worthwelle's answer

However since build 17666 Notepad will be able to do wrap-around search and you don't need to mess with that Up/Down options. That'll likely enter the main branch on Windows 10 version 1809

Wrap-around find/replace: We’ve made significant improvement to the find/replace experience in Notepad. We added the option to do wrap-around find/replace to the find dialog and Notepad will now remember previously entered values and the state of checkboxes and automatically populate them the next time you open the find dialog. Additionally, when you have text selected and open the find dialog we will automatically populate the search field with the selected text.

Announcing Windows 10 Insider Preview Build 17713

Notepad wrap around search

  • 17
    :o they're making notepad useful? What next - hex editor? regex? Why not just toss it out and put VSCode in instead.. :) – Caius Jard Sep 19 at 10:55
  • 4
    @CaiusJard why would anyone who doesn't do coding need VS code? At least MS made Notepad understand *nix line endings for WSL to work, and while taking the chance to fix that why don't just do other improvements as well? – phuclv Sep 19 at 14:38
  • 3
    @CaiusJard they used to have a sort-of hex editor, good ol' MS-DOS debug (think it might still exist in 32-bit Windows) :-) – Aaron F Sep 19 at 15:55
  • 3
    @phuclv it was a bit of a tongue-in-cheek comment from me initially, but the essence of it was; they have at least one really smart, powerful text editor, and after about 20 years of dev notepad is getting the most basic of features to improve its usability - if they carry on in this way, in about 150 years or so, notepad will be vscode, so why not just drop notepad and use some (hollowed out, if you insist) vscode right now.. – Caius Jard Sep 19 at 16:46
  • 8
    A notepad instance uses 2 MB of RAM and starts instantly. VS Code... doesn't. – josh3736 Sep 19 at 21:32

Notepad's "find" feature searches either forward or backwards using the cursor's current position as a reference point.

You can see the radio buttons "Up" and "Down" for search direction. "Down" searches for the next match after the cursor, and "Up" searches for the previous match before the cursor. As you search, it moves the cursor around so that it doesn't find the same text over and over again.

The search doesn't wrap around when you hit the end of a document (unlike many other text editing programs).

You can either move the cursor to the beginning of the document, or you can change the radio button to "Up" to search in reverse.

As many have pointed out the reason is cursor is at the end, and it does not support wrap around. What has not been mentioned yet rather than trying both up and down direction searches (Say you were in middle, you would need to try both) you can simply Ctrl+A then Ctrl+F, since all are highlighted it will search everything.

  • 4
    It's better to use Ctrl+Home since nothing will be selected and you won't accidentally delete the content by pressing some key – phuclv Sep 21 at 1:29

Is Notepad's "Find" function completely useless or am I missing something?

Notepad is basically useless. I only use it when I am writing short batch files (because cmd.exe doesn't like UNIX line endings) or need a very quick scratch pad to jot some brief notes that I don't mind losing in the event of a power outage. Notepad is very light on system resources and has the fastest startup time of any Windows text editor I've ever used but that's probably because it is near useless. WordPad, which also comes with Windows, is even more useless as a text editor for a variety of reasons - unless you need to create RTF files for some odd purpose.

When you need to find text in a text file on Windows, I recommend installing and using a real text editor. I still use Crimson Editor (the 2004 version, not the mostly broken Emerald Editor version). It's a really good editor as long as you don't need non-ASCII character encodings - it'll do UTF-8 but only if you coax it - and, IMO, beats Notepad++ on all the core areas of text editing that matter even though it is pretty old software at this point. Crimson also handles loading 200MB+ log files pretty well - most editors choke after 30-50MB. UltraEdit and Vim are the only other two text editors out there that can handle extremely large text files (not that you asked). I can't stand Notepad++, VS Code, and most text editors but Crimson's not for everyone either. Notepad++ Portable can be used on (most) machines that don't allow installing software on them.

My recommendation is to try a few different text editors to find one you like - just search for "alternative to [name of text editor]" on Google to start finding hundreds of options. Quite a few are free and pretty much any text editor is vastly superior to Notepad except for the few that come with obvious malware.

If you need to find specific text across multiple files on Windows, I recommend the findstr command from a Command Prompt:

cd path\to\files
findstr /sic:"what you want to find" *

It's WAY faster than any other method of finding things via Windows Explorer.

  • 2
    I use notepad as a staging area to wash RTF formatting, it cures a lot of evils. In ancient times Help/About would report installed memory. It is still useful as a scratch pad when copying and pasting snippets of data that Notepad++ would need to be programmed to highlight. – mckenzm Sep 20 at 22:55
  • 6
    This doesn't really answer the question. – Blackwood Sep 20 at 23:05
  • Just looked up Crimson Editor (never heard of it before) and see that the latest version was released in... 2008. I doubt that it even has 64-bit version, and no Unicode support is a big no-no, most people live in countries where ASCII is not enough, and even if you're speaking English you'll still need symbols like →μ►™✔👍... in Unicode. most editors choke after 30-50MB most advanced editors I've used can handle a log file of hundreds of MBs or even GBs without problem. Probably you haven't updated for decades. And findstr isn't as good as grep if you want to do advanced searching – phuclv Sep 21 at 1:41
  • "find specific text across multiple files on Windows I recommend the findstr", I'd recommend installing ripgrep, you can get it from the ripgrep Chocolatey package, it's built using Rust and can be ridiculously fast at searching through massive code bases. – icc97 Sep 23 at 13:36

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.