[Userscript] WaniKani Lesson Filter

What is it?

This script lets you specify the number of lessons of each type you want to do in a given session, while maintaining WaniKani’s intended lesson order. This means that if you use this script with the Ascending level then subject setting, you will get the radicals, kanji, and vocab that WaniKani wants you to learn first, just limited to how many lessons of each type you want.

How to Install?

  1. As always, make sure you have a script manager installed. If you don’t, follow these instructions.
  2. Get the script here: WaniKani Lesson Filter

Recommended Workflow

  1. On the settings page, use Ascending level then subject or Ascending level then shuffled.
  2. When doing lessons, type in the total number of radicals, kanji, and vocab you want to learn in the inputs. If you leave an input blank, the script will keep all lessons for that type.
  3. Optionally, use the orange input to specify the batch size you want to use. If you leave it blank, it will use the batch size from your settings.
  4. Click the Filter button to apply the input values to your lesson session.
  5. Optionally, click the Shuffle button if you want to randomize the order of those lessons.


Note: If you click the Shuffle button before the Filter button, you are basically using WaniKani’s Shuffled lesson setting.

What to do if the UI doesn’t appear

The WaniKani team started making a lot of UI changes to the lessons page in 2021. Unfortunately that means this script is more like to break than before. In the event that the script’s UI (see image above) no longer appears, it may still be possible to use the script via the dev console. However, keep in mind that even this approach may not work depending on what WaniKani changed. To use the script using the dev console, use the following steps:

  1. Open the dev console via F12.
  2. Select the Console tab.
  3. The filter function is defined as:
    window.filterLessons(batchSize, radicalCount, kanjiCount, vocabCount).

    Call it with the specific values you want to use (in place of the text batchSize, etc.), and use null when you don’t want to override a value (just like how you’d leave the input blank in the UI version). For example, window.filterLessons(null, 3, 5, null) means to not change the batch size from the default, filter to 3 radicals, filter to 5 kanji, and keep all vocab.
  4. The shuffle function can be called directly using window.shuffleLessons(). Nothing needs to be passed in.


  • This script has only been tested in Chrome using Tampermonkey, but will likely work in Firefox as well.
  • Please post any bugs/requests and I’ll get back to you as soon as I can.

Revision History

1.3.1 - Fix an issue where the quiz would start early or require extra clicks / keypresses, particularly after changing the batch size.
1.3.0 - Add ability to filter and shuffle via the dev console in case the UI ever breaks due to changes made by the WaniKani team.
1.2.4 - Use new selectors to properly re-render the page after filtering/shuffling. This was necessary due to this change.
1.2.3 - Blur the buttons after they are clicked so that hitting Enter executes the default WaniKani action instead of ‘clicking’ the button again
1.2.2 - Fix a new bug from a recent WaniKani UI change.
1.2.1 - Decrease the chances of conflicting with other scripts.
1.2.0 - Add a new input for setting your batch size.
1.1.1 - Stop the item batch UI from overlaying the lesson filter UI.
1.1.0 - Your previously used filter values will now be saved and loaded automatically. The values will not be applied automatically and must still be applied using the Filter button.
1.0.0 - Initial release.

About to enter the painful levels... searching for advice on how to handle the pain
Level up times without reordering lessons
Trial Period Graduation
Userscripts on Android (Browser)
[iOS] Tsurukame - native app with offline lessons and reviews
My Journey of 368 days (+ The Ultimate Guide for WK :open_book: )
An overdue level 60 post
Vocabulary vs Leveling
Vocabulary vs Leveling
Trying to get my apprentice to 0
[iOS] Mobile AlliCrab for WaniKani
Lesson rate, things are a bit weird now
I can never get ahead on Lessons. What am I doing wrong?
I only did kanjis for a while
Page Changing rapidly
Question regarding speed
Lesson ordering changes on refresh
What do you want now? (Request extensions here)
How to balance lessons? Kanji vs vocab
How many new lessons do you do per day?
New lesson order always kanji first
Burned out, now back
Lesson ordering changes on refresh
Lvls 50+ too fast?
How to do radicals of next level before vocabularies
Kanji vs Vocab advice?
Lesson retention, Survey and Discussion
Estimate reviews per day
Estimate reviews per day
Leveling up very slowly, am I doing something wrong?
Is WaniKani sub-optimal?
~Level 7 Leaderboard Group
Overwhelming frequency of lessons starting from level 40 + solution
Not-so-slowly and steadily levelling up
My Journey of 368 days (+ The Ultimate Guide for WK :open_book: )
To those who do 10-20 lessons a day
To those who do 10-20 lessons a day
What is the reorder script and how to figure out a pace?
Incorrect vocabulary and leveling up progress
Stuck on Level 7 ... How should I work this?
[Question] Wanikani reorder script and 1x1 mode efficiency
Learn correctly
100 Apprentice?
Ascending order, subject
Is there a way to switch off automatically leveling up?
1 Year of WK
Cutting lessons short
Harder to recall
The New And Improved List Of API and Third Party Apps
Level 60 in 362 straight days of reviews
Better default lesson order
The right pacing of doing lessons
The New And Improved List Of API and Third Party Apps
I have 100 lessons. Is this normal?
Reviews suddenly up 60-80 in the morning
How do you personally setup your lessons?
Benefits of Doing Vocab before Radicals/Kanji
I keep on waking up to so many reviews
Lesson batch size - many small batches or a few large batches?
Should I slow down or keep momentum?
Lesson session sometimes gets stuck
Level 21 before 2021!
How to deal with lessons
Still on Lesson 4 after nearly a month!
New People Questions! ~~~<3 [Lost?! Confused?! We're here to help!]
How Many Lessons Per Day
My Journey of 368 days (+ The Ultimate Guide for WK :open_book: )
How am I doing (image of stats inside)?
Why are 90% of kanji not unlocked at the beginning of the level?
How do you properly process 50+ lessons?
How to select the type of lesson
Question on Lessons
[Android] Leap for WaniKani Demo (Native, Offline, No Web)
[Android] Flaming Durtles - Android app with offline support
Upcoming Front-End Updates on WaniKani & Effect on Scripts
Should I clear all my Vocab lessons before leveling up?
Any tips for taking it slow (and not abandonning WK again)?
I've been holding myself back. When should I start speeding up?
My Journey of 368 days (+ The Ultimate Guide for WK :open_book: )
Self help scripts
Self help scripts
New to forums, not entirely new to Wanikani
Best way to study
Always at 0 reviews and 0 lessons, will workload pick up?
Level 21 before 2021!
How to deal with lessons
Upcoming Front-End Updates on WaniKani & Effect on Scripts
Reaching lvl 30 soon, but I need WaniKani advice on how to move forward
The 0/0 Streak Challenge
Suggestion regarding separating lessons
Is this really sticking?
More lessons or focus on reviews?
Lesson question - clear the queue or space them out?
What is your strategy when you level up?
New feature: confirm on lesson exit
Doing fine with reviews, but overwhelmed by lessons
Vocab from past level
Best beginner strategy?
My Journey of 368 days (+ The Ultimate Guide for WK :open_book: )
Option to intentionally delay levelling-up to avoid getting overwhelmed
Possibility to sort out lessons by radicals/kanji/vocabulary?
Let's climb Tokyo Skytree - level 60 in spring 2022
I finally broke my cycle!
Level 21 before 2021!
I'm a bit overwhelmed
How do I slow down?
I need some help
How to responsibly use Reorder Scripts?
Is there a way to make vocab come first in lessons?
魔女の宅急便 (Kiki’s Delivery Service) Discussion Thread: Chapter 5
[Userscript]: Reorder Ultimate 2 [newest]
Lessons not coming quick enough in level 3
Quick question- I'm using reorder script wrong, help pls!
When should we do new lessons?
The script most important that I've missed
How do I deal with having 120+ lessons?
Option to intentionally delay levelling-up to avoid getting overwhelmed
My Journey of 368 days (+ The Ultimate Guide for WK :open_book: )
Sad Lesson Crabigator 😔
Easy tips to being more efficient
If i change the max no. of lessons per session to 4 how many years will it take?
Should I put off lessons if I have > N things at "Apprentice"
Websites that enhance WK experience?
Is there a planner to estimate dates of completion using lesson numbers?
What order are lessons in?
Doing 7 levels in a month
Do I need to slow down?
Japanese to English in Reviews is not helping me think in Japanese often
How many items per batch you learn?
How many items per batch you learn?
Prioritize Vocabulary?
3 month long levels, any suggestions?
Concerned with Lessons
Does Wanikani have a difficulty curve?
Anyone having trouble with the WK Lesson Filter?
Fallynleaf's study log
[REQUEST][QUESTION] Order script to related Vocab right after each Kanji
Lift off! Level 60 and counting
Do you finish all of your current level's vocab before moving to the next level?
[Userscript]: Reorder Ultimate 2 [newest]
Made it to Level 10!
:durtle_hello: Let's Durtle the Scenic Route :turtle:
3 month long levels, any suggestions?
Your friendly neighborhood has become level 60
Wanikani Easier Pacing (to prevent quitting and burnout)
So many new lessons
Advice for filtering lessons
Is there still a lesson reorder script that works?
This is a certified "Level 60" classic
Rearrange the lessons
I don't know if I can do this
[Userscript]: Reorder Ultimate 2 [newest]
WaniKani Lesson Ordering II (obsolete, does not work)
WaniKani Lesson Ordering II (obsolete, does not work)
Kanji don't exist in a bubble - The argument for doing your vocab reviews
Lesson Reorder Script
New lesson anxiety?
Does anyone else have this problem?
How do you break up your lessons?
Fallynleaf's study log
8 days a level...but how?
My Journey of 368 days (+ The Ultimate Guide for WK :open_book: )
[Unsupported] App Store script
Constant level reset safe zone
Olympians (medalists announced - congrats everyone!)
Why is vocab the most complicated and most abundant in Wanikani
How do I finish Wanikani in 2 years or so?
I wish we had to do vocab lessons before leveling up
Been away for a year, trying to get back in
Starting wanikani as an advanced speaker -- should I continue?
[Userscript] Reorder Omega
Suggestions for limiting new lessons
Method to estimate how long it will take to 'catch 'em all'
What do you want now? (Request extensions here)
What can I reset if I reset my account?
Levelling up faster?!
A way to stagger new lessons?
[Userscript] WaniKani Lesson Cap
Buried in lessons
Is it weird how excited and nervous I am to have become a lifer?
Lessons too clustered?
ロウェナの学習ログ・(Rowena's Study Log)
Asking for WaniKani efficiency tips
How would I go about scheduling if I only have time in the late-afternoon and evening?

Alert to @AnimeCanuck, @aplayne, and @ccookf since the three of you have expressed interest in this script.

Awesome! I’ve already done my lessons for the day so I’ll check it tomorrow.

Oh, I’m not using Chrome! All my scripts and WK doings are on Firefox. In fact, I don’t even have Chrome installed on my Windows 7 drive…

Can I copy-paste your Tampermonkey code into Greasemonkey? Do people know if that works, usually?

I think he’s saying he’s only tested in Chrome, but I don’t see any reason you can’t install it into firefox as normal

@AnimeCanuck Sorry for the confusion, @bladepoint is right. I just meant that I only tested in Chrome, but there’s no reason to think it wouldn’t work in Firefox. I’ve edited my original post to clarify this.

Speaking more generally, code that works in Chrome will generally work in Firefox and other modern browsers. I specifically didn’t use any newer JavaScript features so that I wouldn’t have to worry about browser compatibility. Let me know if you have any issues, but I expect it to work.

This used to be one of my favourite sites at work until I started specializing in server-side code It tells you what versions of what browsers support a specified feature, and if it’s limited, what those limitations are:

I know, I just didn’t feel like worrying about it. With something as simple as this, the only thing I might have used was let, and I didn’t even use that out of habit.

woop woop awesome!

1 Like

Thanks. I just used it and it worked fine.

May be nice to be able to set a default that it remembers. But it works fine as is. Thanks again.

Yeah, I was thinking of saving the typed in values so that the browser remembers what was used last. I’ll look into it.


Installing and trying this out today ~ with mostly only Vocab items and a few kanji at the end of my level, and leaving my settings to “shuffle”. I’ll try other settings once I level up in a few days. ^^

EDIT: Oh… So your “shuffle” button… when you meant it “acts like Shuffle”… you meant completely, not at all taking into account the numbers. I put in 3 kanji and 2 Vocab, and clicked it, and it returned 1 kanji and 4 vocab. When I clicked a second time, it returned 0 kanji (all Vocab). Clicking “Filter” returned expected results. Also I see you set it to be directly below Reorder Ultimate. (Thanks! I hadn’t picked anything there, so I don’t know if there’s any interference, but there doesn’t appear to be.)

If you do add that, could you make that an option?

Correct, the shuffle button acts completely independently of the inputs and filter button. If you look at my Recommended Workflow section again, you’ll notice that #3 says to click Filter to apply the input values and #4 says to optionally click Shuffle.

I expected the order to depend on which script was first in the script manager. In my testing though, mine always appeared below Reorder Ultimate. I’m not really sure why, but I didn’t think it mattered enough to look into it.

If you completely filter out a type in my script (by typing in 0), that type won’t be removed from Reorder Ultimate’s UI. There is a simple change that can be made in the Reorder Ultimate script to solve this, but I wanted to see if my script actually got non-negligible usage before requesting xMunich to update his script.

EDIT: My script is completely stateless, so nothing you do in Reorder Ultimate can break my script. It just may change the order of the queue, after which my script will of course maintain that new order when clicking Filter.

I’m not sure how I’d do that other than a variable at the top of the code so that people can manually turn it on and off. I’d rather not bloat the script’s UI like with a way to toggle between saving and not saving the values in the inputs, Any reason in particular you don’t like that idea?

Actually, I think that is really handy when working with them in conjunction - when leaving the main setting (in WK’s settings) to “shuffle” then you can choose which levels and items to even have in the pile with Reorder Ultimate, before filtering them with your script into what kind of lesson session you want to see. I think that’s just lovely. <3 (I was just making an observation. XD)

I had remembered that you had said that, however as it was still a button on your script, for some reason I still expected the numbers to be taken into account - for instance if I had any other setting besides “shuffle” in the WK main settings, I would expect your shuffle button to take those numbers I’ve input and shuffle that many items of those types from across the levels - probably overriding the ascending level order. *shrugs* Now I know it doesn’t work that way. (This is why one tries different things, after all.)

This is exactly the behaviour I had hoped it would have. ^^ Awesome.

I was thinking a simple yes/no checkbox.
Personally I don’t, as I vary my inputs all the time depending on my mood - how much I think I can handle at any time I’m doing lessons. When I’m pretty tired, I will not want to learn anything other than vocabulary, and even then I’ll keep refreshing/hit reorder(the centre of the scale, actually) to pop up 5 or as many as I can easier terms which I can guess the meaning and/or reading already. Having the cache/browser remember your last setting could make a tired person (me) bring up other things that I’m just not capable of at times such as those.

And also, it takes up (very little) memory (but that’s not a reason for a toggle, but a reason for none at all).

Even when I’m not sleepy, I often do one session of 1-2R, 2K, 1-2V, followed by 1K, 4V, (or just 5V), depending on how difficult the kanji were. Then if I come back in 4 hours after my first Apprentice review, I’ll usually want only Vocab (sometimes with 1 more Kanji if it’s not too late)… So for me, always changing it is beneficial to my personal style.

That may not be the case for everyone, of course. Hence the suggestion of a toggle.

(Sorry that was possibly way too detailed an answer.)

Just to clarify, saving the previously used filter would not automatically apply it; it would just pre-populate the inputs. You’d still have to click Filter to apply the values, and therefore you could still change the input values before filtering. This feature wouldn’t be useful for you, but it seems like it shouldn’t hurt either. Does that make sense?

Oh… It seems like I misunderstood again.


It has really been a long 3 days of watching children for 8 hours and getting up many hours earlier than normal to boot. Sorry.

Version 1.1.0 is now live. Please let me know if you see any issues.


Your previously used filter values will now be saved and loaded automatically. The values will not be applied automatically and must still be applied using the Filter button.

Question! What items does the script pull from the lessons queue? First item you’re supposed to have, or a random item?

Meaning, if I use Ascending level then shuffled, will the vocab the script give me first from the previous levels, or will it just pick a random vocab?

The script will always use the first items of each type from the queue. So if you use Ascending level then shuffled, you will always get the vocab from the previous levels first. This is, of course, assuming that you haven’t clicked the Shuffle button yet.

1 Like