Skip to content

Instantly share code, notes, and snippets.

@mikegrima
Last active October 13, 2024 06:31
Show Gist options
  • Save mikegrima/ae56dc1ad09f8f90ae2b3d109a718ad9 to your computer and use it in GitHub Desktop.
Save mikegrima/ae56dc1ad09f8f90ae2b3d109a718ad9 to your computer and use it in GitHub Desktop.
Edit Brave Browser Dictionary

Fix Brave Browser Dictionary

If you have ever mistakenly added a word to the Brave browser dictionary, you need to manually edit the Custom Dictionary.txt file.

As of March 2020, the Brave UI lacks a feature to do this.

Where is the file?

This will depend on your OS. Google for where this is on your OS.

The file on macOS is at: ~/Library/Application\ Support/BraveSoftware/Brave-Browser/Default/Custom\ Dictionary.txt.

Use your favorite text editor to edit and save the file.

@mikegrima
Copy link
Author

@LondonAppDev Oh no did they move it??

@joshjohanning
Copy link

There's a checksum on the final line, does that need to be changed? I removed the accidentally added dictionary item, but it doesn't seem to do the red squigglies in the UI anymore.

@mikegrima
Copy link
Author

mikegrima commented Mar 31, 2023

I don't recall seeing a checksum unless that's new? Did you try closing and reopening (I know that sounds dumb)?

EDIT: Oh wow look at that. There is a checksum in there now... We'll need to check what the code in chromium is doing here: https://chromium.googlesource.com/chromium/src/+/refs/heads/main/chrome/browser/spellchecker/spellcheck_custom_dictionary.h#39

@joshjohanning
Copy link

I tried totally deleting the file and my previously saved dictionary (including the word I want to remove) still appear to now squiggle in Brave.

It also adds it here, and I have removed it from the list, but it still is stuck and won't re-squiggle :)

open -a TextEdit ~/Library/Spelling/LocalDictionary

@joshjohanning
Copy link

I can re-create the checksum they have in the source by going here and leaving a trailing new line.
image

But still, even with the checksum is correct I am not sure how to purge an old word.

@mikegrima
Copy link
Author

Yuck, what a mess!

@joshjohanning
Copy link

Alright I think it is actually working now but the word I mistakenly added was assit. If I type that in a sentence, it squiggles.

If I put it on a new line, like
assit

it doesn't squiggle. Well anyway, hopefully this chicken scratch above is helpful to someone in the future. Good luck to everyone in the future :)

@xCrimin4L
Copy link

xCrimin4L commented Oct 31, 2023

On Windows 10 (and probably 11), the location is:

%LocalAppData%\BraveSoftware\Brave-Browser\User Data\Default\Custom Dictionary.txt

or you can manually enter your local AppData location:
C:\Users\<USER>\AppData\Local\BraveSoftware\Brave-Browser\User Data\Default\Custom Dictionary.txt

@costomodgen
Copy link

On MAC OS, update April 2024, they moved the location of the dictionary to:

~Library/Application Support/BraveSoftware/Brave-Browser/Default

When you right click and select "Add to Dictionary" in Brave, it creates a file "Custom Dictionary.txt" in the Default folder. I have edited that Custom Dictionary.txt, deleted, it done what I can think of to remove incorrectly added words. However, nothing has fully removed those words from the custom dictionary, that is, they are still incorrectly spelled, but not indicted with a red line.

This is the furthest I have gone, can anyone give an update how to reimplement the red lines on words that are accidentally-added to the dictionary?

@AzureCloudMonk
Copy link

As usual, with crappy Brave, it is buggy as can be. It works fine on Windows 10-11, macOS, but not on Ubuntu. Can edit the Custom Dictionary.txt file in /home/USERNAME/.config/BraveSoftware/Brave-Browser/Default and it shows up in the brave://settings/editDictionary GUI, but the red squiggles never go away on words in the Custom Dictionary.txt. There iOS Brave is extremely buggy and crashes often. Typical nowadays with Big Tech entry level cut and paste coders using GPT/CoPilot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment