It's common to see anytime written as one word at times and written separately as two words (any time) other times. The question about which is proper and correct isn't answered so easily, however here are some thoughts on the subject…
According to Fowler's Modern English Usage (Second Edition):
"Any time is sometimes written as one word in U.S. but is always two in Britain."
According to Bartleby.com, which references Kenneth G. Wilson (1923–). The Columbia Guide to Standard American English. 1993.:
"anytime (adv.) is an Americanism usually spelled as one word (The meeting can be scheduled anytime), although it can still be two words when it is an adjective modifying a noun (I will not have any time until Thursday)."
Various other sources say that when used as an adverb for "at any time", it should be anytime. When used with the word "at", it should be two words any time.
I have a personal preference that agrees with the above and that is I use any time (two separate words) when the word "at" proceeds it. I use the term anytime when the word "at" is not included before it.
And, of course, I properly use any time when I am specifically talking about an amount of time, as in saying, I don't have any time to do it right now.
The following question was received in response to this article:
I wonder if you would make a special case for this use of "anytime/any time": "Anytime is a bad time …" Do you think that in this case, since the issue is "time," that 'anytime' should necessarily be two words? Thus, "Any time is a bad time …" is correct, while "Anytime is a bad time …" is ill advised?
My answer: I would use "Anytime" (one word). The test for me is if I can substitute a specific block of time for the "any time". The above sentence, "Five minutes is a bad time", fails the test. In the example sentence before it, "I don't have any time to do it right now", the "five minute" test works better — "I don't have five minutes to do it right now".
But it would be interesting to know, what would you use?
In most cases, it really is more of a preference thing whether you choose to use it as two words. If confused or undecided, just use it in the form of two words any time and you'll be fine.