I have more than 20 filters, how can I easily reorder them?

7 Answers 7


Go to Settings > Filters.

alt text

This will result in an xml file. You could edit the xml file to move the order of the filters, and then reverse the process and import them.

  • 1
    Oh dear, this sounds like more work than scrolling down each time ;-) Guess I'll keep doing that then! Though +1 for the solution
    – Ivo Flipse
    Commented Jul 16, 2010 at 6:47
  • 4
    The Filter import/export it's now a standard feature. Three Gmail labs graduation into standard features - Google Apps Update Alerts Commented Aug 3, 2015 at 15:55
  • 2
    It stopped working for me, now filters are imported in a random order (see webapps.stackexchange.com/questions/121474/… ) Commented Oct 18, 2018 at 19:46
  • I have multiple filters that tag my email based on the +whatever string I use on my gmail account. ex. [email protected]. I have a final rule that effectively says 'If there is no tag archive this message'. This ordering means rules appear in my iPhone mail app if sent to the correct email account and spammy-ish email settles into the base gmail account that I occasionally look at. This ordering has kept my gmail account usable on my iPhone until now. Based on the random order, messages may or may not make it to me, making gmail suddenly far less useful to me. Anyone from google? Commented Jan 23, 2019 at 17:06
  • 1
    The disadvantage of this approach is that you have to delete existing filters first, and only then re-import. There is a risk you won't be able to load them back soon enough (network problem, etc). Even if all goes well for a short time some of your mails risk to bypass filters. Commented Sep 9, 2019 at 14:42

Any time you save a filter, it goes to the bottom of the list. Once you know what order you want your filters in, open each one in order, and just click Save without changing anything. When you get to the last one, the filters are all in order.

Of course, you would have to repeat this if you ever really did have to change a filter.

  • 1
    Not anymore. It's in alphabetic order now.
    – IBoS
    Commented Aug 29, 2014 at 18:48
  • 1
    Mine still behave as I described, and have not been rearranged into alphabetic (or any other) order.
    – AndyDan
    Commented Sep 3, 2014 at 0:16
  • 7
    This worked for me, but I had to change something in the filter. Just saving it without making changes did not move it to the bottom of the list. Commented Oct 15, 2014 at 1:32
  • 6
    Confirming that this does work but only if you actually change the filter. (and 'update all current conversations' is not a change) Commented Jun 29, 2016 at 17:28
  • 2
    This does not work for me, using the "new" Gmail (June 2018). Even if I change the filter and save it the order of the filters is not changed.
    – MrWhite
    Commented Jun 26, 2018 at 22:01

As of this writing, if you are using the new GMail UI then the export/import approach to re-ordering rules no longer seems to work. I tried all of the options listed in all of the comments on this thread and my rules appear in random order.

I also tried every trick I could think of in the XML file and could not seem to enforce any order. The top line <id> tag seems to imply an order but also only seems to apply the order downloaded.

For anyone needing ordering of rules processing in your gmail box, please use the GMail feedback feature and copy a link to this Stack Exchange conversation into your feeback response. It might be slightly abusing SO but if you also upvote this answer it might indicate to the GMail team how much interest there is in ordering rules.

In my case I include a +whatever suffix on any person or entity that I give my email address to and a corresponding rule to apply the whatever label. At the end I have a rule that says archive this message if it has no labels. Until today when I export/imported rules to add a new label, this has performed swimmingly to keep known, valuable email in my inbox and everything else relegated to the whenever I care to review it archived folder.

Gmail folks, I think this is a swing and a miss on rules processing. Please restore control to me and predictability to how I sort my mail. I understand Gmail is free. I hope you understand how valuable this feature is. I believe this is a case where real intelligence is still more accurate than the artificial kind.

  1. Export all filters
  2. Delete all filters
  3. Edit XML in text editor to reorder filters
  4. Import XML

Editing the XML sounds like it is more complicated than it is in reality.

  • 1
    Not working in 2019
    – d0g
    Commented Jan 4, 2019 at 13:05
  • zeev seems to think this is not working. It would be nice if this comment could be more specific. There is a entry at a later date from Antonio below here that indicates zeev is wrong. Commented Mar 15, 2019 at 18:55
  • 1
    This is the only thing that worked for me today, also 2019.
    – Lambart
    Commented Jul 18, 2019 at 23:38
  • Great to get this confirmed @lambart Commented Sep 14, 2019 at 7:49

April of 2019 I found a fix. Make a "new" filter exactly as it was before, with one exception. In the "To:" field put an address that is different from before. Doesn't matter what it is, just has to be different, everything else has to be the same as the "old" filter.

Save it.

The filter should save at the bottom of the list as it is a "new" unique filter with the same specifications as the "old" filter. Once the "new" filter is saved, go back and edit the filter with the proper address and save it. It should stay at the bottom of the list, at least it did for me.

Hope this helps others as I was having issues sorting all the marketing stuff from my wanted email. This should work for other filters as well, although it is much more labor intensive.

  • Sorry, not working for me. I just tried the export -> edit -> import trick, and that worked.
    – Lambart
    Commented Jul 18, 2019 at 23:39

I just put a number as prefix & then it sorts automatically:

03_Anything else
  • 1
    Please add a comment when down voting. Helps the new users understand what could be wrong with their posts.
    – slybloty
    Commented Dec 13, 2018 at 18:23
  • I didn't downvote, but a problem with this answer is... where do you "put" the prefix. I see no place (in the UI) where you can put a name on your filters.
    – Lambart
    Commented Jul 18, 2019 at 23:40

Both the answers from Pål Børsting and from AndyDan did worked for me. But the original question was for those who have more than 20 filters, and i have 98. Obsviously, i prefer the solution to edit a XML file, as it is much more simple and scalable once we are familiar with this. Sorry, i can not vote neither comment your answers without the necessary points.

But the answer from Rebecca Chernoff did not worked for me. I think it should not be accepted as an answer to the question how can I easily reorder them, or it should be completed to work correctly. To reorder the filter rules, it was necessary to 'delete all filters' before to 'import XML', as it was correctly answered by Pål Børsting.

If a XML filter file is imported without previously deleting the rules, a changed rule filter will be at the end, as noted AndyDan. Although this behavior could be confortably acceptable by most users, the rules order DO modify the semantic effect of the filters (like mine) that have an equivalent of a stop matching next rules like in this example:

Matches: (-label:zLabelToStopActions subject:EMERGENCY -subject:DGV)
Do this: Skip Inbox, Apply label "noc"

Matches: (-label:zLabelToStopActions subject:EMERGENCY -subject:DGV)
Do this: Apply label "zLabelToStopActions"

Matches: -label:zLabelToStopActions subject:EMERGENCY
Do this: Skip Inbox, Apply label "dgv", Mark it as important

This auxiliary label zLabelToStopActions was used just to give me the effect of a stop matching next rules. Without it, and if the ORDER is not exactly as shown above, the resulting logic for this filter can easily become unpredictable. For example, all messages with subject:EMERGENCY could match all 3 rules above, and do all these correspoding actions:

rule 1: Skip Inbox, Apply label "noc"

rule 2: Apply label "zLabelToStopActions"

rule 3: Skip Inbox, Apply label "dgv", Mark it as important

But the latest actions was expected to be done only for the messages that have not the word DGV in their subject.

As a final remark, if Pål Børsting agree, i suggest to invert the order 2 and 3 of his answer and, this way, to delete all filters only we are really ready to import them.

  • 1
    Please note that this is not a discussion forum. Only use the Answer space to offer a solution to the original question.
    – ale
    Commented Jan 11, 2018 at 19:13
  • Well. You put me in a deadlock. As i noted in my first paragraph, i can not yet comment an answer; i tried, but i could not.
    – Antonio
    Commented Jan 11, 2018 at 19:15
  • 1
    I understand you're eager to participate, but there's a reason there is a minimum reputation limit for leaving comments. See also: Why do I need 50 reputation to comment? What can I do instead?
    – ale
    Commented Jan 11, 2018 at 19:17
  • Ok, thanks for this link, i've just read it. It seems to me this site has a high level of paranoia, when compared with the reality; like Yahoo with its messages. That's one reason some people prefers Google, that has a lower level of paranoia because of a better treatment of its inputs.
    – Antonio
    Commented Jan 11, 2018 at 19:25
  • It's not an issue of "paranoia" but a practical one of being able to find the answer to a question quickly and efficiently. There may be some good info here, but it doesn't really address the question at hand, as Al has mentioned. If you think there's some information that's worth preserving, you are welcome to ask and answer your own question.
    – jonsca
    Commented Jan 11, 2018 at 19:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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